- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to migrate a WIN32 DLL that includes C++ and FORTRAN modules from Compaq Visual FORTRAN to Intel Visual FORTRAN with Microsoft Visual Studion 2012 The FORTRAN modules currently compile as a "Custom Build Tool" from the command prompt. I was hoping that by upgrading to the Intel compiler that the FORTRAN modules would be recognized as a registered build item but that does not appear to be the case. I do not see a way to select the FORTRAN compiler from the property pages.
I can certainly configure a "Custom Build Tool" with proper compiler syntax, but I wonder if I am missing something?
(I can build FORTRAN only projects fine and all the packages seem to be installed correctly according to Intel's documentation).
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The way you have to do this in VS2002 and later is create separate projects for the C++ and Fortran code in one solution. Microsoft removed the ability to have two languages in a single project. For a DLL, pick one language as a DLL project and the other as a static library, making sure that the runtime library settings for the static library are set to the same as for the DLL project. You then make the static library a "dependent" project of the DLL project and build the solution.
When converting from CVF, the "Extract Compaq Visual Fortran Project Items" wizard will do most of this work for you, but it seems you're doing something it isn't prepared to handle.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. I thought that might be a Visual Studio limitation. I'll probably start with using a custom build step and then migrate to the static library of the Fortran only modules.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll have to add the paths to the Fortran executables in the C++ directory list in order to get ifort recognized in a C++ project. My advice is to skip the custom build step and move to separate projects. You'll get the full benefits of the Fortran integration then.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page