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

What does /dbglibs flag link into project?

Brian_Triplett
576 Views
I am compiling a program with the "Debug Multithreaded" Runtime Library which sets the /libs:static /threads and /dbglibs compiler options. This is fine for a debug build; however, when I switch to a Release build where I move to the default "Multithreaded" Runtime library (which removes the /dbglibs flag) I get tons of "LNK2001: unresolved external symbol" errors. They missing references include __fltused, __alloca_probe, _memset, among others.

Does anyone have any idea what is not getting linked in with the /dbglibs flag to resolve all these missing references?
0 Kudos
3 Replies
mecej4
Honored Contributor III
576 Views
The missing references are more likely the result of an attempt to link objects compiled in a Debug build with objects compiled in a Release build. Have you attempted cleaning and rebuilding the Release version of your project?
0 Kudos
Brian_Triplett
576 Views
I try to to a clean build to no avail. I am linking to some custom libraries (i.e., ones not included with the v12 compiler) but non of the missing symbols are from those.
0 Kudos
Steven_L_Intel1
Employee
576 Views
These symbols are different in the DLL and static versions of the C run-time library. If you are linking to libraries built with a C compiler (and I don't mean those supplied with Fortran), you need to select the same library type as C used (DLL vs. static, debug vs. nondebug).

The linker will tell you which object modules made references to these symbols.
0 Kudos
Reply