CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   C++ and FORTRAN (https://www.cfd-online.com/Forums/main/7615-c-fortran.html)

Steve May 31, 2004 23:15

C++ and FORTRAN
 
Hi, I'm presently using Visual C++ to write and compile my code, but might need to convert to using FORTRAN. I heard from my senior that it is actually possible to use C++ code and compile under FORTRAN, or something like that. Is this possible? Or rather, is there any way for me to run my code under FORTRAN without changing my present C++ text to FORTRAN language? Thanks!!

Leo June 1, 2004 00:44

Re: C++ and FORTRAN
 
You have to carry out the changes since you are using VC++. MS uses libraries that may not be available if you are using a fortran compiler from some other vendor. Under linux there is a utility available that can convert C code to Fortran. Intel has free fortran 90 compiler available for personal use.

Leo June 1, 2004 00:58

Re: C++ and FORTRAN
 
Also, the sooner you stop using VC++, the better. Linux can handle such jobs better.

Steve June 1, 2004 02:12

Re: C++ and FORTRAN
 
Ok, thanks for the advice, Leo :)

Tim June 1, 2004 07:57

Re: C++ and FORTRAN
 
It is also possible to call a c subroutine from fortran (and vice versa) if thats any use to you?


All times are GMT -4. The time now is 02:29.