
Did you define in stdafx.h? #define BOOST_INTERPROCESS_USE_DLL #define BOOST_LIB_DIAGNOSTIC // prints the libs linked Maybe you have to do this for other boost-libs too. Oliver Am Mittwoch 22 Juli 2009 17:38:43 schrieb Audino, Jeremy:
Using Visual Studio 2005, I have two independent static libraries making use of boost. When linking both into an executable I'm getting some multiply defined symbols. I suspect that since most of boost's implementation is header-only, symbols for the boost library functions are appearing in both libraries. I can get around this by specifying /FORCE:MULTIPLE when linking, but this isn't ideal. Is there a better way to get around this?
Best Regards, Jeremy
libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::get_file_name_from_handle_function(void *,wchar_t *,unsigned int,unsigned int &)'::`7'::library_unloader::library_unloader(void *)" (??0library_unloader@?6??get_file_name_from_handle_function@winapi@interpro cess@boost@@YA_NPAXPA_WIAAI@Z@QAE@0@Z) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::get_file_name_from_handle_function(void *,wchar_t *,unsigned int,unsigned int &)'::`7'::library_unloader::~library_unloader(void)" (??1library_unloader@?6??get_file_name_from_handle_function@winapi@interpro cess@boost@@YA_NPAXPA_WIAAI@Z@QAE@XZ) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`9'::handle_closer::handle_closer(void *)" (??0handle_closer@?8??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QAE@ PAX@Z) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`9'::handle_closer::~handle_closer(void)" (??1handle_closer@?8??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QAE@ XZ) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`11'::auto_ptr::auto_ptr(union `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`10'::mem_t *)" (??0auto_ptr@?L@??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QAE@PATm em_t@?9??1234@YA_N0@Z@@Z) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`11'::auto_ptr::~auto_ptr(void)" (??1auto_ptr@?L@??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QAE@XZ) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: union `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`10'::mem_t * __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`11'::auto_ptr::get(void)const " (?get@auto_ptr@?L@??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QBEPAT mem_t@?9??2345@YA_N0@Z@XZ) already defined in libDICOMTOOLSD.lib(Log.obj) libNMRSD.lib(NMRSModule.obj) : error LNK2005: "public: union `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`10'::mem_t * __thiscall `bool __cdecl boost::interprocess::winapi::unlink_file(char const *)'::`11'::auto_ptr::operator->(void)const " (??Cauto_ptr@?L@??unlink_file@winapi@interprocess@boost@@YA_NPBD@Z@QBEPATme m_t@?9??1234@YA_N0@Z@XZ) already defined in libDICOMTOOLSD.lib(Log.obj) C:\home\jaudino\src\prs-removal\bin\translatorD.exe : fatal error LNK1169: one or more multiply defined symbols found
Jeremy F. Audino Senior Software Development Engineer Philips Healthcare -- Nuclear Medicine Tel: 440-483-7444 E-mail: jeremy.audino@philips.com
________________________________ The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost