Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26736 Discussions

Possible missing Macro definition with Visual Studio 2017

New Contributor I

I have created a new project with a C++ main and a Fortran static library subroutine. It all seems to be OK. However linking fails as the Fortran Sttaic library definition is missing in the Link>Input field. It seems like Intel Fortran macro which creates the Library Project seems to add a Macro called "%(Additional Dependencies)" which seems to be never defined as it can be seen from the following picture:


I can see that Fortran compiler compiles and creates the library. I am attaching the solution ZIP file. I can always enter the Libray location manually, but I want to find a better solution. Any help would be appreciated.

I. Konuk


0 Kudos
1 Reply
Black Belt Retired Employee

The problem is that, as of VS2015, C++ projects no longer include non-C++ dependent projects in link dependencies. You have to manually add the Fortran library to the link properties or as a source file in the C++ project.