Link error with boost regex and STLport
Hello, I've searched in both stlport and boost forums, but I couldn't find anything yet about my problem. I'm using boost 1.33, and I tried to compiled with STL port. Boost compiles fine (except boost python, but I'll have a look later) and when I link my program, I have the following errors : boost.lib(w32_regex_traits.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall stlp_std::basic_string<unsigned short,class stlp_std::char_traits<unsigned short>,class stlp_std::allocator<unsigned short> >::basic_string<unsigned short,class stlp_std::char_traits<unsigned short>,class stlp_std::allocator<unsigned short> >(unsigned short const *,class stlp_std::allocator<unsigned short> const &)" Do you have an idea of what could be the problem, and how to solve it ? I tried with STLport 4.6.2, 5.0.2 and 5.1, and I have the same error. Thanks, Gérald
Gérald FAUVELLE wrote:
Hello,
I've searched in both stlport and boost forums, but I couldn't find anything yet about my problem.
I'm using boost 1.33, and I tried to compiled with STL port. Boost compiles fine (except boost python, but I'll have a look later) and when I link my program, I have the following errors :
boost.lib(w32_regex_traits.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall stlp_std::basic_string<unsigned short,class stlp_std::char_traits<unsigned short>,class stlp_std::allocator<unsigned short> >::basic_string<unsigned short,class stlp_std::char_traits<unsigned short>,class stlp_std::allocator<unsigned short> >(unsigned short const *,class stlp_std::allocator<unsigned short> const &)"
Do you have an idea of what could be the problem, and how to solve it ?
Very strange, we do test with MSVC+STLport and I haven't seen that one before ! Could this relate to the way you built STLport: maybe with wchar_t as a native type? Boost.Regex assumes that wchar_t is not a native type when using STLport, because that's STLport's default behaviour. Hopefully this gives you some clue...? John.
Same problem on Linux using gcc-4.1.1 and glibc-2.4. Since Matlab's mexglx files don't like libstdc++'s std::string operations like str1 + str2 (--> segfault) I'm using STLport-5.0.2 which solves this issue. But now I can't use boost_regex :( Maik
Maik Beckmann wrote:
Same problem on Linux using gcc-4.1.1 and glibc-2.4. Since Matlab's mexglx files don't like libstdc++'s std::string operations like str1 + str2 (--> segfault) I'm using STLport-5.0.2 which solves this issue. But now I can't use boost_regex :(
Why not? Did you build regex against STLport? Thanks, John.
Hello John
Why not? Did you build regex against STLport?
It isn't that important to me to solve this isse, since at work (I'm a student helper) I'm using mingw wich works fine with matlab libstdc++ and boost regex. But maybe there are others who need to handle this, so for investigation... ... I compiled boost-1.33.1 by typing: bjam -sTOOLS="gcc-stlport" -sSTLPORT_PATH="/usr/include/stlport/" -sSTLPORT_VERSION="5.0.2" -sBUILD="release <runtime-link>dynamic <stlport-iostream>on" stage and adding a symbolic link ln -s libstlport.so libstlport_gcc.so in /usr/lib since boost links with -lstlport_gcc. I'm using cmake where this is the CMakeList.txt file being relevant: <CMakeList.txt> set(incl_dirs ${incl_dirs} /usr/include/stlport ) set( incl_dirs ${incl_dirs} ../utils ) include_directories( ${incl_dirs} ) set(lib_dirs ${lib_dirs} /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true ) link_directories( ${lib_dirs} ) add_definitions(-D_REENTRANT ) add_executable(find_regex find_regex.cc) target_link_libraries(find_regex boost_regex-gcc-p-1_33_1 stlport ) </CMakeList.txt> Here is what gcc says: <make output> cd /home/maik/Eigene-Dateien/WZL/java_file_io/eclipse/C ++-Dateieinlesen/release/src/tests && /usr/bin/c++ -O2 -march=athlon-xp -mtune=athlon-xp -pipe -m3dnow -mmmx -fomit-frame-pointer -momit-leaf-frame-pointer -fno-ident -fvisibility-inlines-hidden -fPIC "CMakeFiles/find_regex.dir/find_regex.o" -o find_regex -rdynamic -L/home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true -lboost_regex-gcc-p-1_33_1 -lstlport -Wl,-rpath,/home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true CMakeFiles/find_regex.dir/find_regex.o: In function `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> >
::perl_matcher(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)': find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC1ES3_S3_RNS_13match_resultsIS3_S8_EERKNS_11basic_regexIcSC_EENS_15regex_constants12_match_flagsES3_[boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)]+0x86): undefined reference to `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)' CMakeFiles/find_regex.dir/find_regex.o: In function `bool boost::regex_search<char const*, stlp_std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)':find_regex.cc:(.text._ZN5boost12regex_searchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESC_[bool boost::regex_search<char const*, stlp_std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)]+0x6a): undefined reference to `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()' CMakeFiles/find_regex.dir/find_regex.o: In function `void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)': find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xda): undefined reference to `boost::re_detail::raise_runtime_error(stlp_std::runtime_error const&)'
collect2: ld returned 1 exit status make[2]: *** [src/tests/find_regex] Error 1 make[2]: Leaving directory `/home/maik/Eigene-Dateien/WZL/java_file_io/eclipse/C ++-Dateieinlesen/release' make[1]: *** [src/tests/CMakeFiles/find_regex.dir/all] Error 2 make[1]: Leaving directory `/home/maik/Eigene-Dateien/WZL/java_file_io/eclipse/C ++-Dateieinlesen/release' make: *** [all] Error 2 </make output>
The source file: <source> #include <iostream> #include <string> #include <vector> #include <boost/algorithm/string_regex.hpp> using std::string; using std::vector; using boost::regex; using boost::find_all_regex; using boost::find_regex; using boost::iterator_range; int main(int argc, char** argv) { iterator_range<string::const_iterator> cv_result; string str = "Drehmoment: 200.00 Nm 400.0 Nm"; // [0-9]*\.[0-9]* Nm // \d{3} regex e1("[0-9]*\\.[0-9]*.*Nm"); cv_result = find_regex(str,e1); for (iterator_range<string::const_iterator>::iterator it = cv_result.begin(); it != cv_result.end(); ++it) { std::cout << *it << std::endl; } vector<string> tokens; find_all_regex(tokens,str,e1); for (vector<string>::iterator it = tokens.begin(); it != tokens.end(); ++it) { std::cout << *it << std::endl; } return 0; } </source> If you want me to, I can try with boost-cvs. Maik
Maik Beckmann wrote:
Hello John
Why not? Did you build regex against STLport?
It isn't that important to me to solve this isse, since at work (I'm a student helper) I'm using mingw wich works fine with matlab libstdc++ and boost regex. But maybe there are others who need to handle this, so for investigation...
... I compiled boost-1.33.1 by typing:
bjam -sTOOLS="gcc-stlport" -sSTLPORT_PATH="/usr/include/stlport/" -sSTLPORT_VERSION="5.0.2" -sBUILD="release <runtime-link>dynamic <stlport-iostream>on" stage
That would look for the STLport headers in "/usr/include/stlport/STLport-5.0.2/stlport" which I suspect in not what you wanted. The linker errors are certainly typical of what happens when you link against a regex lib that is *not* built against STLport. And yes, we need to improve the error checking in these STLport toolsets. HTH, John.
bjam -sTOOLS="gcc-stlport" -sSTLPORT_PATH="/usr/include/stlport/" -sSTLPORT_VERSION="5.0.2" -sBUILD="release <runtime-link>dynamic <stlport-iostream>on" stage
That would look for the STLport headers in "/usr/include/stlport/STLport-5.0.2/stlport" which I suspect in not what you wanted. The linker errors are certainly typical of what happens when you link against a regex lib that is *not* built against STLport. And yes, we need to improve the error checking in these STLport toolsets.
HTH, John.
Thanks for this hint, it must be the reason. I'm not at home, thus I can't test it today. I'll give response. Regards, Maik -- "Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ... Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
Hello After I found out how to make bjam verbose for checking the included dirs I build boost again: <command> bjam -d2 -sTOOLS="gcc-stlport" -sSTLPORT_PATH="this/is/a/dummy" -sSTLPORT_VERSION="5.0.2" -sSTLPORT_5.0.2_PATH="/usr/include" -sBUILD="release" stage </command> The "-d2" option to check if it include's the right directory ( should be /usr/include/stlport): <bjam output> gcc-C++-action bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/c_regex_traits.o set -e "g++" -c -Wall -ftemplate-depth-255 -DNDEBUG -DNDEBUG -DBOOST_REGEX_DYN_LINK=1 -D_STLP_USE_DYNAMIC_LIB=1 -O3 -finline-functions -Wno-inline -fPIC -I"bin/boost/libs/regex/build" -I "/usr/include/stlport" -I "/home/maik/Eigene-Dateien/WZL/boost_1_33_1" -o "bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/c_regex_traits.o" "/home/maik/Eigene-Dateien/WZL/boost_1_33_1/libs/regex/build/../src/c_regex_traits.cpp" <bjam output> but... there are new linker errors: <linker> find_regex.cc:(.text._ZNK8stlp_std12_String_baseIcNS_9allocatorIcEEE21_M_throw_length_errorEv[stlp_std::_String_base<char, stlp_std::allocator<char> >::_M_throw_length_error() const]+0x9): undefined reference to `stlp_std::__stl_throw_length_error(char const*)' CMakeFiles/find_regex.dir/find_regex.o: In function `boost::bad_function_call::~bad_function_call()': find_regex.cc:(.text._ZN5boost17bad_function_callD0Ev[boost::bad_function_call::~bad_function_call()]+0x12): undefined reference to `stlp_std::runtime_error::~runtime_error()' CMakeFiles/find_regex.dir/find_regex.o: In function `boost::bad_function_call::~bad_function_call()': find_regex.cc:(.text._ZN5boost17bad_function_callD1Ev[boost::bad_function_call::~bad_function_call()]+0xb): undefined reference to `stlp_std::runtime_error::~runtime_error()' CMakeFiles/find_regex.dir/find_regex.o: In function `bool stlp_std::_M_init<char, stlp_std::char_traits<char>
(stlp_std::basic_ostream<char, stlp_std::char_traits<char> >&)': find_regex.cc:(.text._ZN8stlp_std7_M_initIcNS_11char_traitsIcEEEEbRNS_13basic_ostreamIT_T0_EE[bool stlp_std::_M_init<char, stlp_std::char_traits<char> >(stlp_std::basic_ostream<char, stlp_std::char_traits<char> >&)]+0x86): undefined reference to `stlp_std::ios_base::_M_throw_failure()' find_regex.cc:(.text._ZN8stlp_std7_M_initIcNS_11char_traitsIcEEEEbRNS_13basic_ostreamIT_T0_EE[bool stlp_std::_M_init<char, stlp_std::char_traits<char> >(stlp_std::basic_ostream<char, stlp_std::char_traits<char> >&)]+0xa2): undefined reference to `stlp_std::ios_base::_M_throw_failure()' CMakeFiles/find_regex.dir/find_regex.o: In function `stlp_std::basic_ostream<char, stlp_std::char_traits<char> ::put(char)': find_regex.cc:(.text._ZN8stlp_std13basic_ostreamIcNS_11char_traitsIcEEE3putEc[stlp_std::basic_ostream<char, stlp_std::char_traits<char> >::put(char)]+0x7c): undefined reference to `stlp_std::ios_base::_M_throw_failure()' find_regex.cc:(.text._ZN8stlp_std13basic_ostreamIcNS_11char_traitsIcEEE3putEc[stlp_std::basic_ostream<char, stlp_std::char_traits<char> >::put(char)]+0xd3): undefined reference to `stlp_std::ios_base::_M_throw_failure()' find_regex.cc:(.text._ZN8stlp_std13basic_ostreamIcNS_11char_traitsIcEEE3putEc[stlp_std::basic_ostream<char, stlp_std::char_traits<char> >::put(char)]+0x187): undefined reference to `stlp_std::ios_base::_M_throw_failure()' CMakeFiles/find_regex.dir/find_regex.o:find_regex.cc:(.text._ZN8stlp_std4endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_[stlp_std::basic_ostream<char, stlp_std::char_traits<char> >& stlp_std::endl<char, stlp_std::char_traits<char> >(stlp_std::basic_ostream<char, stlp_std::char_traits<char> >&)]+0x5c): more undefined references to `stlp_std::ios_base::_M_throw_failure()' follow CMakeFiles/find_regex.dir/find_regex.o: In function `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > ::perl_matcher(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)': find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPKcN8stlp_std9allocatorINS_9sub_matchIS3_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEC1ES3_S3_RNS_13match_resultsIS3_S8_EERKNS_11basic_regexIcSC_EENS_15regex_constants12_match_flagsES3_[boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::perl_matcher(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)]+0x86): undefined reference to `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)' CMakeFiles/find_regex.dir/find_regex.o: In function `bool boost::regex_search<char const*, stlp_std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)': find_regex.cc:(.text._ZN5boost12regex_searchIPKcN8stlp_std9allocatorINS_9sub_matchIS2_EEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEbT_SC_RNS_13match_resultsISC_T0_EERKNS_11basic_regexIT1_T2_EENS_15regex_constants12_match_flagsESC_[bool boost::regex_search<char const*, stlp_std::allocator<boost::sub_match<char const*> >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >(char const*, char const*, boost::match_results<char const*, stlp_std::allocator<boost::sub_match<char const*> > >&, boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags, char const*)]+0x6a): undefined reference to `boost::re_detail::perl_matcher<char const*, stlp_std::allocator<boost::sub_match<char const*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::find()' CMakeFiles/find_regex.dir/find_regex.o: In function `boost::function2<boost::iterator_range<char const*>, char const*, char const*, stlp_std::allocator<boost::function_base> >::operator()(char const*, char const*) const': find_regex.cc:(.text._ZNK5boost9function2INS_14iterator_rangeIPKcEES3_S3_N8stlp_std9allocatorINS_13function_baseEEEEclES3_S3_[boost::function2<boost::iterator_range<char const*>, char const*, char const*, stlp_std::allocator<boost::function_base> >::operator()(char const*, char const*) const]+0x47): undefined reference to `stlp_std::__Named_exception::__Named_exception(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> > const&)' find_regex.cc:(.text._ZNK5boost9function2INS_14iterator_rangeIPKcEES3_S3_N8stlp_std9allocatorINS_13function_baseEEEEclES3_S3_[boost::function2<boost::iterator_range<char const*>, char const*, char const*, stlp_std::allocator<boost::function_base> >::operator()(char const*, char const*) const]+0x5d): undefined reference to `vtable for stlp_std::runtime_error' find_regex.cc:(.text._ZNK5boost9function2INS_14iterator_rangeIPKcEES3_S3_N8stlp_std9allocatorINS_13function_baseEEEEclES3_S3_[boost::function2<boost::iterator_range<char const*>, char const*, char const*, stlp_std::allocator<boost::function_base> >::operator()(char const*, char const*) const]+0x9b): undefined reference to `vtable for stlp_std::__Named_exception' find_regex.cc:(.text._ZNK5boost9function2INS_14iterator_rangeIPKcEES3_S3_N8stlp_std9allocatorINS_13function_baseEEEEclES3_S3_[boost::function2<boost::iterator_range<char const*>, char const*, char const*, stlp_std::allocator<boost::function_base> >::operator()(char const*, char const*) const]+0x13e): undefined reference to `stlp_std::runtime_error::~runtime_error()' CMakeFiles/find_regex.dir/find_regex.o: In function `void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)': find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xa0): undefined reference to `stlp_std::__Named_exception::__Named_exception(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> > const&)' find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xb6): undefined reference to `vtable for stlp_std::runtime_error' find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xda): undefined reference to `boost::re_detail::raise_runtime_error(stlp_std::runtime_error const&)' find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0xe2): undefined reference to `stlp_std::runtime_error::~runtime_error()' find_regex.cc:(.text._ZN5boost9re_detail11raise_errorINS_20regex_traits_wrapperINS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEEEEEvRKT_NS_15regex_constants10error_typeE[void boost::re_detail::raise_error<boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > >(boost::regex_traits_wrapper<boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::error_type)]+0x180): undefined reference to `stlp_std::runtime_error::~runtime_error()' CMakeFiles/find_regex.dir/find_regex.o: In function `boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > ::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)': find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x15e): undefined reference to `stlp_std::__Named_exception::__Named_exception(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> > const&)' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x174): undefined reference to `vtable for stlp_std::invalid_argument' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x1a6): undefined reference to `vtable for stlp_std::__Named_exception' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x1c9): undefined reference to `vtable for stlp_std::invalid_argument' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x1d1): undefined reference to `stlp_std::invalid_argument::~invalid_argument()' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x1d9): undefined reference to `typeinfo for stlp_std::invalid_argument' find_regex.cc:(.text._ZN5boost9re_detail12perl_matcherIPcN8stlp_std9allocatorINS_9sub_matchIS2_EEEENS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE14construct_initERKNS_11basic_regexIcSB_EENS_15regex_constants12_match_flagsE[boost::re_detail::perl_matcher<char*, stlp_std::allocator<boost::sub_match<char*> >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_match_flags)]+0x40e): undefined reference to `stlp_std::invalid_argument::~invalid_argument()' CMakeFiles/find_regex.dir/find_regex.o:(.rodata._ZTVN5boost17bad_function_callE[vtable for boost::bad_function_call]+0x10): undefined reference to `stlp_std::__Named_exception::what() const' CMakeFiles/find_regex.dir/find_regex.o:(.rodata._ZTIN5boost17bad_function_callE[typeinfo for boost::bad_function_call]+0x8): undefined reference to `typeinfo for stlp_std::runtime_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::~locale()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ctype<char>::scan_not(stlpmtx_std::ctype_base::mask, char const*, char const*) const' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ctype<char>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::invalid_argument::~invalid_argument()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::logic_error::~logic_error()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::__Named_exception::what() const' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ctype<wchar_t>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::operator=(stlpmtx_std::locale const&)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::messages<char>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::runtime_error::~runtime_error()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::locale(stlpmtx_std::locale const&)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `vtable for stlpmtx_std::overflow_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::overflow_error::~overflow_error()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::locale()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `vtable for stlpmtx_std::logic_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ios_base::_M_throw_failure()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::collate<wchar_t>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `typeinfo for stlpmtx_std::overflow_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::messages<wchar_t>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::_M_use_facet(stlpmtx_std::locale::id const&) const' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `typeinfo for stlpmtx_std::logic_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::__stl_throw_length_error(char const*)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::__stl_throw_out_of_range(char const*)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `typeinfo for stlpmtx_std::invalid_argument' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ios_base::~ios_base()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `typeinfo for stlpmtx_std::runtime_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `vtable for stlpmtx_std::__Named_exception' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ios_base::imbue(stlpmtx_std::locale const&)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::__Named_exception::__Named_exception(stlpmtx_std::basic_string<char, stlpmtx_std::char_traits<char>, stlpmtx_std::allocator<char> > const&)' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::locale::_M_get_facet(stlpmtx_std::locale::id const&) const' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::numpunct<wchar_t>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `vtable for stlpmtx_std::invalid_argument' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `vtable for stlpmtx_std::runtime_error' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::ios_base::ios_base()' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::numpunct<char>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::collate<char>::id' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `typeinfo for stlpmtx_std::ios_base' /home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true/libboost_regex-gcc-p-1_33_1.so: undefined reference to `stlpmtx_std::runtime_error::~runtime_error()' </linker>
It looks like I didn't linked to libstlport.so, but here is the linker command line: <linker command> /usr/bin/c++ -O2 -march=athlon-xp -mtune=athlon-xp -pipe -m3dnow -mmmx -fomit-frame-pointer -momit-leaf-frame-pointer -fno-ident -fvisibility-inlines-hidden -fPIC "CMakeFiles/find_regex.dir/find_regex.o" -o find_regex -rdynamic -L/home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true -lboost_regex-gcc-p-1_33_1 -lstlport -Wl,-rpath,/home/maik/Eigene-Dateien/WZL/boost_1_33_1/bin/boost/libs/regex/build/libboost_regex.so/gcc-stlport/release/shared-linkable-true </linker command> I think there's something wrong with the command I build boost with, again. John, can you please give me an bjam command to build boost right. STLport headers are in /usr/include/stlport and the libs in /usr/lib. Thanks in advance, Maik
participants (3)
-
Gérald FAUVELLE
-
John Maddock
-
Maik Beckmann