Boost logo

Boost Users :

Subject: [Boost-users] [regex] link problem with MSVC
From: Thomas Mang (thomasmang.ng_at_[hidden])
Date: 2011-02-21 09:00:13


HI,

I had built boost version 1.40 (some time ago) myself with MSVC 2008
Express, a complete build.
I now wanted to use the regex library; I left the default option of
statically linking it in (no #define BOOST_REGEX_DYN_LINK) and also
count on auto-linking (no BOOST_REGEX_NO_LIB).

Using regex_search, I keep getting linker errors:

Error 1 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: void __thiscall
std::_Container_base::_Orphan_all(void)const "
(__imp_?_Orphan_all@_Container_base_at_std@@QBEXXZ) referenced in function
"public: class std::vector<struct boost::sub_match<char const *>,class
std::allocator<struct boost::sub_match<char const *> > > & __thiscall
std::vector<struct boost::sub_match<char const *>,class
std::allocator<struct boost::sub_match<char const *> >
>::operator=(class std::vector<struct boost::sub_match<char const
*>,class std::allocator<struct boost::sub_match<char const *> > > const
&)"
(??4?$vector_at_U?$sub_match_at_PBD@boost@@V?$allocator_at_U?$sub_match_at_PBD@boost@@@std@@@std@@QAEAAV01_at_ABV01@@Z)
    libboost_regex-vc90-mt-gd-1_40.lib

Error 2 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: __thiscall
std::_Container_base::~_Container_base(void)"
(__imp_??1_Container_base_at_std@@QAE_at_XZ) referenced in function "public:
__thiscall std::_Vector_val<struct boost::sub_match<char const *>,class
std::allocator<struct boost::sub_match<char const *> >
>::~_Vector_val<struct boost::sub_match<char const *>,class
std::allocator<struct boost::sub_match<char const *> > >(void)"
(??1?$_Vector_val_at_U?$sub_match_at_PBD@boost@@V?$allocator_at_U?$sub_match_at_PBD@boost@@@std@@@std@@QAE_at_XZ)
    libboost_regex-vc90-mt-gd-1_40.lib

and some more others.

Me doing something wrong or a boost issue ?
I tried to disable auto-linking and specifiy the lib
(libboost_regex-vc90-mt-gd-1_40.lib for debug build) myself but it does
not seem to link it in statically (wants the DLL on startup).

many thanks and best,
Thomas


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net