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

Problem building a debug executable using an debug library

vriesdwj
Beginner
702 Views
Hi,
I have a problem building a debug executable using an debug library.
First I did build a library. I build a debug version and a release version.
Then I try to build an executable that needs this library.
What succeeds:
If I build a release executable using a release library.
If I build a release executable using a debug library.
If I build a debug executable using a release library.
What fails:
If I build a debug executable using a debug library.

Error messages are:
m_utils.obj : error LNK2019: unresolved external symbol _GETCWD referenced in function _M_UTILS_mp_GETOS
ops_get_arg.obj : error LNK2001: unresolved external symbol _GETCWD
ops_main.obj : error LNK2019: unresolved external symbol _EXIT referenced in function _MAIN__
ops_main.obj : error LNK2019: unresolved external symbol _SYSTEM referenced in function _MAIN__
ops_write_progress.obj : error LNK2019: unresolved external symbol _FLUSH referenced in function _OPS_WRITE_PROGRESS
Debug/ops_debug.exe : fatal error LNK1120: 4 unresolved externals

m_utils.mod, ops_get_arg.for ops_main.for and ops_write_progress.for are some of the sources I'm compiling now and that are not in the library.

What can I do to make this work?

Regards, Wilco de Vries.
0 Kudos
1 Reply
Steven_L_Intel1
Employee
702 Views
Please paste into a reply here the text under Properties > Fortran > Command Line > All Options for the failing executable project configuration and then for one that works. Please also post this information for the library in both Release and Debug configurations.

My guess is that for the library, you have Libraries > Disable Default Library Search Rules set to Yes for the debug configuration and No for the Release configuration, and that for the executable project, you have Compatibility > Use PowerStation Portability Library set to Yes for the Release configuration and No for the Debug configuration.

That's the only thing that comes to mind.
0 Kudos
Reply