Boost linkt nicht mit einem VS2005 (x64) Projekt



  • Hi,

    ich habe ein Projekt, bei dem verschiedene externe Libs verwendet werden (ANTLR, Crypto++ und Boost).
    Mit dem W32 Target kann ich alles kompilieren und linken, aber nicht mit dem x64 Target.

    Ich bekomme folgende Linking-Errors:

    Verknüpfen...
    4>cryptlib.lib(cryptlib.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
    4> Creating library test.lib and object test.exp
    4>StatementChecker.obj : error LNK2001: unresolved external symbol "private: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?basic_regex@DU?basic\_regex@DU?regex_traits@DV?w32\_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z) 4>libcommon.lib(StatementChecker.obj) : error LNK2001: unresolved external symbol "private: class boost::basic\_regex > > & \_\_cdecl boost::basic\_regex > >::do\_assign(char const *,char const *,unsigned int)" (?do\_assign@?basic_regex@DU?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z)
    4>libcommon.lib(ConnectionStringParser.obj) : error LNK2001: unresolved external symbol "private: class boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > > & __cdecl boost::basic_regex<char,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::do_assign(char const *,char const *,unsigned int)" (?do_assign@?basic_regex@DU?basic\_regex@DU?regex_traits@DV?w32\_regex_traits@D@boost@@@boost@@@boost@@AEAAAEAV12@PEBD0I@Z) 4>StatementChecker.obj : error LNK2001: unresolved external symbol "private: void \_\_cdecl boost::re\_detail::perl\_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex\_traits > >::construct\_init(class boost::basic\_regex > > const &,enum boost::regex\_constants::\_match\_flags)" (?construct\_init@?perl_matcher@V?_String_const_iterator@DU?\_String\_const\_iterator@DU?char_traits@D@std@@V?allocator@D@2@@std@@V?allocator@D@2@@std@@V?allocator@U?sub_match@V?sub\_match@V?_String_const_iterator@DU?char_traits@D@std@@V?char\_traits@D@std@@V?allocator@D@2@@std@@@boost@@@2@U?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?basic_regex@DU?basic\_regex@DU?regex_traits@DV?w32\_regex\_traits@D@boost@@@boost@@@3@W4\_match\_flags@regex_constants@3@@Z) 4>libcommon.lib(StatementChecker.obj) : error LNK2001: unresolved external symbol "private: void \_\_cdecl boost::re\_detail::perl\_matcher,class std::allocator >,class std::allocator,class std::allocator > > >,struct boost::regex\_traits > >::construct\_init(class boost::basic\_regex > > const &,enum boost::regex\_constants::\_match\_flags)" (?construct\_init@?perl_matcher@V?_String_const_iterator@DU?\_String\_const\_iterator@DU?char_traits@D@std@@V?allocator@D@2@@std@@V?allocator@D@2@@std@@V?allocator@U?sub_match@V?sub\_match@V?_String_const_iterator@DU?char_traits@D@std@@V?char\_traits@D@std@@V?allocator@D@2@@std@@@boost@@@2@U?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?basic_regex@DU?basic\_regex@DU?regex_traits@DV?w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regexconstants@3@@Z)4>StatementChecker.obj:errorLNK2001:unresolvedexternalsymbol"public:bool__cdeclboost::re_detail::perl_matcher<classstd::_String_const_iterator<char,structstd::char_traits<char>,classstd::allocator<char>>,classstd::allocator<structboost::sub_match<classstd::_String_const_iterator<char,structstd::char_traits<char>,classstd::allocator<char>>>>,structboost::regex_traits<char,classboost::w32_regex_traits<char>>>::match(void)"(?match@?w32\_regex\_traits@D@boost@@@boost@@@3@W4\_match\_flags@regex_constants@3@@Z) 4>StatementChecker.obj : error LNK2001: unresolved external symbol "public: bool \_\_cdecl boost::re\_detail::perl\_matcher<class std::\_String\_const\_iterator<char,struct std::char\_traits<char>,class std::allocator<char> >,class std::allocator<struct boost::sub\_match<class std::\_String\_const\_iterator<char,struct std::char\_traits<char>,class std::allocator<char> > > >,struct boost::regex\_traits<char,class boost::w32\_regex\_traits<char> > >::match(void)" (?match@?perl_matcher@V?_String_const_iterator@DU?\_String\_const\_iterator@DU?char_traits@D@std@@V?allocator@D@2@@std@@V?allocator@D@2@@std@@V?allocator@U?sub_match@V?sub\_match@V?_String_const_iterator@DU?char_traits@D@std@@V?char\_traits@D@std@@V?allocator@D@2@@std@@@boost@@@2@U?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA_NXZ)
    4>libcommon.lib(StatementChecker.obj) : error LNK2001: unresolved external symbol "public: bool __cdecl boost::re_detail::perl_matcher<class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<struct boost::sub_match<class std::_String_const_iterator<char,struct std::char_traits<char>,class std::allocator<char> > > >,struct boost::regex_traits<char,class boost::w32_regex_traits<char> > >::match(void)" (?match@?perl_matcher@V?perl\_matcher@V?_String_const_iterator@DU?char_traits@D@std@@V?char\_traits@D@std@@V?allocator@D@2@@std@@V?allocator@U?allocator@U?sub_match@V?_String_const_iterator@DU?\_String\_const\_iterator@DU?char_traits@D@std@@V?allocator@D@2@@std@@@boost@@@2@U?allocator@D@2@@std@@@boost@@@2@U?regex_traits@DV?w32\_regex\_traits@D@boost@@@boost@@@re\_detail@boost@@QEAA\_NXZ) 4>libcommon.lib(ConnectionStringParser.obj) : error LNK2001: unresolved external symbol "private: void \_\_cdecl boost::re\_detail::perl\_matcher >,struct boost::regex\_traits > >::construct\_init(class boost::basic\_regex > > const &,enum boost::regex\_constants::\_match\_flags)" (?construct\_init@?perl_matcher@PEBDV?allocator@U?allocator@U?sub_match@PEBD@boost@@@std@@U?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@AEAAXAEBV?basic_regex@DU?basic\_regex@DU?regex_traits@DV?w32_regex_traits@D@boost@@@boost@@@3@W4_match_flags@regexconstants@3@@Z)4>libcommon.lib(ConnectionStringParser.obj):errorLNK2001:unresolvedexternalsymbol"public:bool__cdeclboost::re_detail::perl_matcher<charconst,classstd::allocator<structboost::sub_match<charconst>>,structboost::regex_traits<char,classboost::w32_regex_traits<char>>>::match(void)"(?match@?w32\_regex\_traits@D@boost@@@boost@@@3@W4\_match\_flags@regex_constants@3@@Z) 4>libcommon.lib(ConnectionStringParser.obj) : error LNK2001: unresolved external symbol "public: bool \_\_cdecl boost::re\_detail::perl\_matcher<char const *,class std::allocator<struct boost::sub\_match<char const *> >,struct boost::regex\_traits<char,class boost::w32\_regex\_traits<char> > >::match(void)" (?match@?perl_matcher@PEBDV?allocator@U?allocator@U?sub_match@PEBD@boost@@@std@@U?regex_traits@DV?regex\_traits@DV?w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QEAA_NXZ)
    4>test.dll : fatal error LNK1120: 5 unresolved externals

    Ich habe Boost mit folgendem Befehl für x64 kompiliert und die Libs in ein seperates Verzeichnis (lib_x64) kopiert:

    bjam.exe --build-dir=e:\boost-build --build-type=complete --toolset=msvc --address-model=64 --with-regex --with-system --with-test

    Warum kann er dennoch nicht linken?
    Die Libs sind da, er scheint sie ja auch zu finden, sonst gäbe es einen anderen Error.

    Jemand eine Idee?



  • Dieser Thread wurde von Moderator/in Martin Richter aus dem Forum MFC (Visual C++) in das Forum Compiler- und IDE-Forum verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.


Anmelden zum Antworten