Problem using separate types linker option
-
I have a set of C++ static libraries that is released as part of my product, and used by other developers to build their applications. Someone using these libraries is gettings an error linking in debug mode (missing debugging information for referencing module) which only occurs when the separate types linker option is turned off - when it is on the program links successfully. Does anyone know how to resolve this so that linking can still be done successfully in debug mode without having to use separate types? Do I need to distribute the .pdb files along with the static libraries or something like that? Dave http://www.cloudsofheaven.org
-
I have a set of C++ static libraries that is released as part of my product, and used by other developers to build their applications. Someone using these libraries is gettings an error linking in debug mode (missing debugging information for referencing module) which only occurs when the separate types linker option is turned off - when it is on the program links successfully. Does anyone know how to resolve this so that linking can still be done successfully in debug mode without having to use separate types? Do I need to distribute the .pdb files along with the static libraries or something like that? Dave http://www.cloudsofheaven.org
I'm not entirely sure, but I think your problem lies in the fact that you need to produce separate static libraries built to link to the various types of run-time libraries (static and dynamic). You need to produce a library with different warts for each of the different linker options (/MD /MDd /ML /MLd ) and Unicode options if applicable.. This makes about 8 libraries you need to compile for completeness. It's a real pain... however you can make it so the users of the libraries are not too inconvenienced by using the
#pragma comment(lib, _libraryName_)
compiler directive. Good luck. //.ichael