- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Does anyone have any idea what is not getting linked in with the /dbglibs flag to resolve all these missing references?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
The linker will tell you which object modules made references to these symbols.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page