Hadian wrote on 18-OCT-2006 15:47:38.49
>would you send me a simple program files with the commands you use to
>compile them?
F90 part something like :
program dumm
call wx_graphics()
end
subroutine hallo
write(*,*) 'hallo world'
return
end
C++ part something like
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
// .... your normal wxWidgets stuff and definitions.... //
extern "C"
{
void wx_graphics_();
void hallo_();
}
void wx_graphics_()
{
char** argv;
int argc = 1;
argv = (char**) malloc( 1 );
argv[0] = "progname\0";
wxEntry( argc , argv );
free( argv );
}
// If this event is defined i.e. from a drop down menu
// note that I omitted the correct definition of wxecanvas::wx_wxcanvas_select
// but that is "standard" wxWidgets
void wxecanvas::wx_wxcanvas_select(wxCommandEvent &event )
{
hallo_();
}
copilation on linux with intel F90 and g++ :
ifort -c fortran.F90
g++ -c cxx.cpp
ifort xxxxxx fortran.o cxx.o
where xxxxxx are all the libraries you need for your implementation of
wxWidgets.
Note that for other compilers then the Intel F90 compiler for linux the
routines hallo_ and wx_graphics_ may have to be replaced by hallo and
wx_graphics in the C++ source (There are even compiles that add 2 _'s in
certain cases)
Jouk
Bush : All votes are equal but some votes are more equal than others.
>------------------------------------------------------------------------------<
Jouk Jansen
[log in to unmask]
Technische Universiteit Delft tttttttttt uu uu ddddddd
Kavli Institute of Nanoscience tttttttttt uu uu dd dd
Nationaal centrum voor HREM tt uu uu dd dd
Lorentzweg 1 tt uu uu dd dd
2628 CJ Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2782272 tt uuuuuuu ddddddd
>------------------------------------------------------------------------------<
|