Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

C++ and Fortran mixed code link error

Hello,

I’m using Visual Studio 2017 Community with the Intel Fortran compiler. With my current configuration the “C_calls_Fortran" example contained in the “MixedLanguage" package from Intel builds and runs on Win32 but does not fully build on x64. I get a LNK1104 error, cannot open file 'kernel32.lib’ with x64. 

 
for x64.
 
I’ve looked at and tried a lot of examples in the forum to no avail. In Project Properties, settings in VC++ Directories are:
 
Include Directories: $(IFORT_COMPILER18)\compiler\include\intel64;$(IncludePath)
Library Directories: $(IFORT_COMPILER18)\compiler\lib\intel64;$(LibraryPath)
 
there are more than a few versions of kernel32.lib loaded on my computer and I’m guessing that I’m referencing the wrong one. The value of IncludePath is:
 
C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_20189.1.156\windows\\compiler\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.12.25827\include;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\T
 
Ideas for fixing this problem?
 
Thanks.
0 Kudos
2 Replies
Highlighted
2 Views

It wouldn't be the INCLUDE

It wouldn't be the INCLUDE environment variable that controlled finding a .lib file; it would be the LIB environment variable.

Please check the LibraryPath

 

                 --Lorri

0 Kudos
Highlighted
Beginner
2 Views

I found the problem. I was

I found the problem. I was missing a paren in one of the macros. Doh!

 

0 Kudos