Using Boost 1.33 with STLport 5.0 on MSVC71
::~basic_string
(void)" (??1?$basic_string@DV?$char_traits@D@stlpd_std@@V?$allocator@D@2@@stlpd_std@@QAE@XZ) already defined in
Dear all,
I'm having a problem linking the simplest Boost unit_test program on the
platform described above. More details here:
Compiler: MSVC71
OS: WinXP Pro SP2
STLport 5.0 config: All default as obtained from CVS STLPORT_5_0 branch,
except that I use /Zc:wchar_t to use wchar_t as built-in type.
Boost 1.33/34: All default as obtained from CVS, built with the
following command line:
bjam --without-python "-sBUILD=debug release <runtime-link>static
<threading>multi <stlport-version>5.0
My project setting uses "Multi-threaded DLL (/MD)" in code gen, and links to "libboost_unit_test_framework-vc71-mt-sgdp.lib" in debug mode. My purpose was to use STLport in a DLL, but the whole Boost statically linked. (I know I can link with "libboost_unit_test_framework-vc71-mt-gdp.lib," but I want Boost to be statically linked.)
You must link to a Boost lib that uses the same runtime as both your project and STLport, for: /MD use libboost_unit_test_framework-vc71-mt-p.lib /MDd use libboost_unit_test_framework-vc71-mt-gdp.lib Both of these are static libraries BTW, dll import libraries don't have the "lib" prefix to them. BTW I strongly recomend that you use /MDd for debug builds, using /MD and then the IDE defining _DEBUG can casue problems with third party libs including Boost and STLport. Finally remember that Boost debug libraries are built with __STL_DEBUG defined: you'll need to define this in your own code in order to link against them. John.
participants (2)
-
John Maddock
-
Wu Yinghui, Freddie