- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
![](/skins/images/3CECF0550DB8BF54496C114A1FF06FE9/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page