Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28630 Discussions

Connect VC++ 2005 with Intel Fortran

jsumalatha
Beginner
262 Views

I am using VC++ 2005. I have 2 projects in this, one is fortran and the other vc++. Actually I am using the fortran file exe in vc++ code to get final exe. Now I dont want 2 exe's, so i am trying this intel fortran compiler. How can i do this(not to use fortran exe).

0 Kudos
2 Replies
anthonyrichards
New Contributor III
262 Views
Quoting - jsumalatha

I am using VC++ 2005. I have 2 projects in this, one is fortran and the other vc++. Actually I am using the fortran file exe in vc++ code to get final exe. Now I dont want 2 exe's, so i am trying this intel fortran compiler. How can i do this(not to use fortran exe).

If you want a C++ main program calling a Fortran routine or function, then you need to make a library (static or dynamic link) from the Fortarn code and link it to your C++ program. Look at the Mixed language programming section of your Fortran compiler's help section.

0 Kudos
Les_Neilson
Valued Contributor II
262 Views
Quoting - jsumalatha

I am using VC++ 2005. I have 2 projects in this, one is fortran and the other vc++. Actually I am using the fortran file exe in vc++ code to get final exe. Now I dont want 2 exe's, so i am trying this intel fortran compiler. How can i do this(not to use fortran exe).

Taking what you say literally and you have two projects creating two exes, then you will need to (a) change your fortran "main" into a subroutine and (b) change your fortran project to build a library/dll (instead of an exe)which is then included in your C++ project.

See the help on programming mixed languages

Les

0 Kudos
Reply