::~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 on
<define>BOOST_SIGNALS_NAMESPACE=siglib" stage
My simple unit_test program:
=====
#include <string>
#define BOOST_AUTO_TEST_MAIN
#include
BOOST_AUTO_UNIT_TEST( Test_Function )
{
std::wstring string = L"some test string";
BOOST_CHECK( string.length() == 16 );
}
=====
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.)
The linker gives the following errors:
stlportstld.5.0.lib(stlportstld.5.0.dll) : error LNK2005: "public:
__thiscall stlpd_std::__owned_list::~__owned_list(void)"
(??1__owned_list@stlpd_std@@QAE@XZ) already defined in
libboost_unit_test_framework-vc71-mt-sgdp.lib(unit_test_suite.obj)
stlportstld.5.0.lib(stlportstld.5.0.dll) : error LNK2005: "public:
__thiscall stlpd_std::basic_string::deallocate(void
*,unsigned int)"
(?deallocate@?$__node_alloc@$00$0A@@stlpd_std@@SAXPAXI@Z) already
defined in
libboost_unit_test_framework-vc71-mt-sgdp.lib(unit_test_suite.obj)
stlportstld.5.0.lib(stlportstld.5.0.dll) : error LNK2005: "public: class
stlpd_std::basic_string & __thiscall
stlpd_std::basic_string::assign(char const *,unsigned int)"
(?assign@?$basic_string@DV?$char_traits@D@stlpd_std@@V?$allocator@D@2@@stlpd_std@@QAEAAV12@PBDI@Z)
already defined in
libboost_unit_test_framework-vc71-mt-sgdp.lib(unit_test_log.obj)
<more similar errors removed...>
Is there any kind soul here can enlighten me a bit? Is it at all
recommended (or even possible) to use STLport in DLL while statically
linking with Boost?
Cheers,
Freddie
--
Wu Yinghui, Freddie
Research & Development
Software Engineer
Volume Interactions Pte Ltd
1 Kim Seng Promenade, #12-01
Great World City East Tower
Singapore 237994
Tel: +65 62226962 (Ext 216)
Fax: +65 62226215
Email: yhwu@volumeinteractions.com
URL: http://www.volumeinteractions.com
Important: This message is intended for the recipient(s) addressed
above. It contains privileged and confidential information. If you are
not the intended recipient, please notify the sender immediately by
replying to this message and then delete it from your system. You must
not read, copy, use, or disseminate this communication in any form.
Thank you.