Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Libraries not being found by linker

Randall_M_
Beginner
334 Views

I am stumped by what must be an obvious oversight on my part. I have a project with two configurations, Release and Debug. The Debug version links with no problem. The Release version link phase is not seeing my libraries and I get a huge number of LNK2019 and LNK2001 errors (unresolved external symbol). I've cut and pasted the info from the compile and link command line windows.

Here is the command line info for the DEBUG compile:

/nologo /I"c:\wint\include" /I"c:\wint\lib.if8" /I"c:\users\randy\documents\mm7X\mmpm70_branch1\mmlib\debug" /I"C:\users\randy\documents\MM7X\mmpm70_branch1\HEADERS" /warn:noalignments /align:rec1byte /assume:byterecl /iface:cvf /module:"Release/" /object:"Release/" /Fd"Release\vc100.pdb" /libs:static /threads /winapp /c

Here is the command line infor for the DEBUG link:

/OUT:"Debug/ezvol.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\Users\Randy\Documents\EZVol8x\ezvol\Debug\ezvol.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"Debug/ezvol.pdb" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\Users\Randy\Documents\EZVol8x\ezvol\Debug\ezvol.lib" user32.lib gdi32.lib winspool.lib winmm.lib comdlg32.lib advapi32.lib shell32.lib  c:\wint\lib.if8\winter.lib c:\wint\bin\pls_153\pls_intel.obj c:\users\randy\documents\mm7x\mmpm70_branch1\mmlib\debug\mmlib.lib

Here is the command line info for the RELEASE compile:

/nologo /I"c:\wint\include" /I"c:\wint\lib.if8" /I"c:\users\randy\documents\mm7X\mmpm70_branch1\mmlib\debug" /I"C:\users\randy\documents\MM7X\mmpm70_branch1\HEADERS" /warn:noalignments /align:rec1byte /assume:byterecl /iface:cvf /module:"Release/" /object:"Release/" /Fd"Release\vc100.pdb" /libs:static /threads /winapp /c

Here is the command line info for the RELEASE link:

/OUT:"Release/ezvol.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"C:\Users\Randy\Documents\EZVol8x\ezvol\Release\ezvol.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:WINDOWS /IMPLIB:"C:\Users\Randy\Documents\EZVol8x\ezvol\Release\ezvol.lib" user32.lib gdi32.lib winspool.lib winmm.lib comdlg32.lib advapi32.lib shell32.lib  c:\wint\lib.if8\winter.lib c:\wint\bin\pls_153\pls_intel.obj c:\users\randy\documents\mm7x\mmpm70_branch1\mmlib\debug\mmlib.lib

The release link step is not seeing the winteracter library (winter.lib) nor is it seeing my mmlib.lib library. I am developing with Visual Studio 10.0.30319.1 and .NET framework 4.0.30319.

Any suggestions would be greatly appreciated. I've spent the better part of a day trying to figure this out.

Regards,

Randy Martin

0 Kudos
4 Replies
Anonymous66
Valued Contributor I
334 Views

Where are winter.lib and  mmlib.lib in your system?

0 Kudos
Randall_M_
Beginner
334 Views

winter.lib is in c:\witn\lib.if8\winter.lib and mmlib is in c:\users\randy\documents\mm7x\mmpm70_branch1\mmlib\debug\mmlib.lib. You can see from the command line summaries that both the RELEASE and DEBUG are pointing to the same locations. I have six other projects that use winteracter, and there is no problem switching between the debug and release configurations. That is why I'm so puzzled.

0 Kudos
Lorri_M_Intel
Employee
334 Views

I see that you have /iface:cvf set on both the DEBUG and RELEASE configurations.

I also see that you're linking against two different "ezvol.lib" import libraries.  Is there a chance that one of those was not built with /iface:cvf?

Finally, if you could do a "clean" and "rebuild" in the failing configuration, and post the log file, that might give us more clues.

                 thanks --

                                --Lorri

0 Kudos
Randall_M_
Beginner
334 Views

Bingo! Thank you so much, Lorri. The problem was that I had iface:cvf set on the release version, rather than default. Not sure how the switch got flipped, but everything links now the way it used to.

Problem solved.

Thanks again,

Randy Martin

0 Kudos
Reply