I started receiving this dreaded warning. I am linking VC++ project with Fortran static library. In 2020 I moved my project to a new folder. But till now, I did not change the library information till recently. I was using old static library I created last year when I tried to use the version compiled and created with the C+ project, I started getting this warning. I am still using VS2017. I compared all the options and tied the suggestion I found here. None worked. As Steve suggested I really do not want to overlook this.
I am attaching the screens from old and new versions of the project as well as the log from the new Solution.
Any suggestion and help would be greatly appreciated.
I added /VERBOSE switch to the linker. I obtained a big output. Microsoft states that
For example, when your executable uses the multi-threaded, non-debug run-time libraries, the list reported should include LIBCMT.lib, and not LIBCMTD.lib
But looking at the log output from linker, it is searching the right library. I see the lines:
Searching C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x86\LIBCMT.lib:
and not the second one:
I would appreciate if you point out to any other library linker is searching for which it should not.
In the Fortran project, property Fortran > Command Line, remove "/libs:static" from "Additional Options". The C++ project is using the DLL libraries and you want the Fortran project to do the same. What happens is that you have specified the DLL libraries but then overrode that with Additional Options.