Re: Call fortran in C++ project
- From: Craig Powers <enigma@xxxxxxxxxx>
- Date: Mon, 31 Mar 2008 14:47:09 -0400
FlyVenus wrote:
Hi, All:
I plan to using a fortran 90 program in C++. I have no experience
about that, and I have some question about that.
1. I think I have two methods to using the fortran 90 program.
First, compile all the .f90 and .cpp to .obj, and link them. Second,
make the fortran 90 program to a dll, and call it in C++ project. I
want to know, which is better, and how I should do?
The second method is likely to involve less pain in terms of figuring out which linker to use, etc. You will still need to use the manual for your Fortran compiler to make sure that your Fortran routine in the dll is designed correctly to be called from C++.
2. In the fortran 90 program, there many Types. How can I using
them in C++.
See the manual for your Fortran compiler on mixed language programming. Possibly, all you will need to do is specify SEQUENCE and make sure that the TYPEs are compatible with C++ (i.e. no pointers or allocatables).
.
- References:
- Call fortran in C++ project
- From: FlyVenus
- Call fortran in C++ project
- Prev by Date: Re: Rounding off double precision
- Next by Date: Re: Press any key to continue?
- Previous by thread: Call fortran in C++ project
- Next by thread: gfortran problem
- Index(es):
Relevant Pages
|
|