We are using Microsoft Visual Studio 2013 Professional. We then installed the latest version of the Intel Fortran compiler, service pack 1 update 2 I think. Running under Windows 7.
Inside Visual Studio we can create a new Fortran project, such as a static DLL, and add Fortran files to it and they compile and link fine. We can also create Visual Studio C++ solutions, which work fine.
But what if you have a Windows C++ application and you want to compile and link in a few Fortran files? In other words, have one EXE with some Fortran and C++ files compiled and linked into it.
If you add the Fortran files to the C++ project, the right mouse click compile option for them is greyed out and under project settings there is nothing for Fortran, only C++. If we import an old Visual Studio 6 / Compaq Fortran mixed solution (which we are actually trying to convert), then the Fortran files come across as custom compilations but with all the settings missing.
We know there is a way to do this. How?
The only thing we can think of is to, under the solution, have a C++ project, and a Fortran project which is a static library, and then link the Fortran static library into the C++ project. But there are complications such as having to export Fortran methods against which you link, which would not necessary if you link all the OBJ files in one link pass.
What are we missing here?