Newbie to boost. I used the MSVC 8.0 installer, and got the first couple of example programs to work, but failed on the regex example. I'm using MSVC 2008 (aka MSVC-9.0) (Express Edition) IDE, in Debug configuration. The linker can't resolve several symbols with libboost_regex_vc80-mt-gd-1_34_1.lib. Stripped of the qualifiers these are: _Orphan_all(void) const, ~_Container_base(void), _Swap_all(...), and insert(...). I switched to release configuration, now the linker looks in libboost_regex_vc80-mt-1_34_1.lib and can't find insert(...). Any suggestions? Should I wait for a MSVC-9.0 installer, and go back to MSVC 2005 in the meantime? Stephen B.
Barberi wrote:
Newbie to boost. I used the MSVC 8.0 installer, and got the first couple of example programs to work, but failed on the regex example. I'm using MSVC 2008 (aka MSVC-9.0) (Express Edition) IDE, in Debug configuration. The linker can't resolve several symbols with libboost_regex_vc80-mt-gd-1_34_1.lib. Stripped of the qualifiers these are: _Orphan_all(void) const, ~_Container_base(void), _Swap_all(...), and insert(...). I switched to release configuration, now the linker looks in libboost_regex_vc80-mt-1_34_1.lib and can't find insert(...).
Any suggestions? Should I wait for a MSVC-9.0 installer, and go back to MSVC 2005 in the meantime?
Stephen B.
------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users bjam is building the libraries for ; del /f /q "stage\lib\libboost_regex-vc90-s.lib" copy "stage\lib\libboost_regex-vc90-s-1_34_1.lib" "stage\lib\libboost_regex-vc90-s.lib"
correctly, and they are in the temp/build-boost directory. But the compiler is looking for; libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2019: unresolved external symbol Shouldn't it be looking for the vc90 version? Dave
David R. Palmer wrote:
But the compiler is looking for;
libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2019: unresolved external symbol
Shouldn't it be looking for the vc90 version?
Weeee...ll VC9 didn't exist when 1.34 was released so it knows nothing about it: if you update boost/config/auto_link.hpp with the one from SVN (http://svn.boost.org/trac/boost/browser/trunk/boost/config/auto_link.hpp) that should fix that problem. HTH, John.
John Maddock wrote: > David R. Palmer wrote: > >> But the compiler is looking for; >> >> libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2019: >> unresolved external symbol >> >> Shouldn't it be looking for the vc90 version? >> > > Weeee...ll VC9 didn't exist when 1.34 was released so it knows nothing about > it: if you update boost/config/auto_link.hpp with the one from SVN > (http://svn.boost.org/trac/boost/browser/trunk/boost/config/auto_link.hpp) > that should fix that problem. > > HTH, John. > > _______________________________________________ > Boost-users mailing list > Boost-users@lists.boost.org > http://lists.boost.org/mailman/listinfo.cgi/boost-users > Okay, I downloaded the auto_link.hpp and placed it in the C:\Program Files\boost\boost_1_34_1\boost\config directory. It is still looking for the older version of the libraries. The libraries have been built and exist, so that isn't the problem. Any help would be appreciated. Thanks. Dave 1>------ Rebuild All started: Project: example, Configuration: Debug Win32 ------ 1>Deleting intermediate and output files for project 'example', configuration 'Debug|Win32' 1>Compiling... 1>stdafx.cpp 1>Compiling... 1>example.cpp 1>*Unknown compiler version - please run the configure tests and report the results* 1>AssemblyInfo.cpp 1>Generating Code... 1>Compiling resources... 1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0 1>Copyright (C) Microsoft Corporation. All rights reserved. 1>Linking... 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> *Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib:* 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1>Finished searching libraries 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> *Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib:* 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1>Finished searching libraries 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> * Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib:* 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1>Finished searching libraries 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> * Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib:* 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1>Finished searching libraries 1>Searching libraries 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCRTD.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\OLDNAMES.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\MSVCMRTD.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\MSCOREE.lib: 1> Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\lib\msvcprtd.lib: 1> *Searching C:\Program Files\boost\boost_1_34_1\lib\libboost_regex-vc80-mt-gd-1_34_1.lib:* 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\kernel32.lib: 1> Searching C:\Program Files\Microsoft SDKs\Windows\v6.0A\\lib\user32.lib: 1>Finished searching libraries 1>libboost_regex-vc80-mt-gd-1_34_1.lib(usinstances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) referenced in function "public: class std::vector,class std::allocator > > & __thiscall std::vector ,class std::allocator > >::operator=(class std::vector ,class std::allocator > > const &)" (??4?$vector@U?$sub_match@PBG@boost@@V?$allocator@U?$sub_match@PBG@boost@@@std@@@std@@QAEAAV01@ABV01@@Z) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Orphan_all(void)const " (__imp_?_Orphan_all@_Container_base@std@@QBEXXZ) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(usinstances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) referenced in function "public: __thiscall std::_Vector_val ,class std::allocator > >::~_Vector_val ,class std::allocator > >(void)" (??1?$_Vector_val@U?$sub_match@PBG@boost@@V?$allocator@U?$sub_match@PBG@boost@@@std@@@std@@QAE@XZ) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::~_Container_base(void)" (__imp_??1_Container_base@std@@QAE@XZ) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(usinstances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) referenced in function "protected: __thiscall std::_Vector_val ,class std::allocator > >::_Vector_val ,class std::allocator > >(class std::allocator >)" (??0?$_Vector_val@U?$sub_match@PBG@boost@@V?$allocator@U?$sub_match@PBG@boost@@@std@@@std@@IAE@V?$allocator@U?$sub_match@PBG@boost@@@1@@Z) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall std::_Container_base::_Container_base(void)" (__imp_??0_Container_base@std@@QAE@XZ) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(usinstances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Swap_all(class std::_Container_base &)const " (__imp_?_Swap_all@_Container_base@std@@QBEXAAV12@@Z) referenced in function "public: void __thiscall std::vector ,class std::allocator > >::swap(class std::vector ,class std::allocator > > &)" (?swap@?$vector@U?$sub_match@PBG@boost@@V?$allocator@U?$sub_match@PBG@boost@@@std@@@std@@QAEXAAV12@@Z) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::_Container_base::_Swap_all(class std::_Container_base &)const " (__imp_?_Swap_all@_Container_base@std@@QBEXAAV12@@Z) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(usinstances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator ,class std::allocator > __thiscall std::basic_string ,class std::allocator >::insert(class std::_String_iterator ,class std::allocator >,unsigned short)" (__imp_?insert@?$basic_string@GU?$char_traits@G@std@@V?$allocator@G@2@@std@@QAE?AV?$_String_iterator@GU?$char_traits@G@std@@V?$allocator@G@2@@2@V32@G@Z) referenced in function "public: struct boost::re_detail::re_syntax_base * __thiscall boost::re_detail::basic_regex_creator > >::append_set(class boost::re_detail::basic_char_set > > const &,struct boost::mpl::bool_<0> *)" (?append_set@?$basic_regex_creator@GU?$regex_traits@GV?$w32_regex_traits@G@boost@@@boost@@@re_detail@boost@@QAEPAUre_syntax_base@23@ABV?$basic_char_set@GU?$regex_traits@GV?$w32_regex_traits@G@boost@@@boost@@@23@PAU?$bool_@$0A@@mpl@3@@Z) 1>libboost_regex-vc80-mt-gd-1_34_1.lib(instances.obj) : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator ,class std::allocator > __thiscall std::basic_string ,class std::allocator >::insert(class std::_String_iterator ,class std::allocator >,char)" (__imp_?insert@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE?AV?$_String_iterator@DU?$char_traits@D@std@@V?$allocator@D@2@@2@V32@D@Z) referenced in function "public: struct boost::re_detail::re_syntax_base * __thiscall boost::re_detail::basic_regex_creator > >::append_set(class boost::re_detail::basic_char_set > > const &,struct boost::mpl::bool_<0> *)" (?append_set@?$basic_regex_creator@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@re_detail@boost@@QAEPAUre_syntax_base@23@ABV?$basic_char_set@DU?$regex_traits@DV?$w32_regex_traits@D@boost@@@boost@@@23@PAU?$bool_@$0A@@mpl@3@@Z) 1>C:\Users\dad\Documents\Visual Studio 2008\Projects\example\Debug\example.exe : fatal error LNK1120: 6 unresolved externals 1>Build log was saved at "file://c:\Users\dad\Documents\Visual Studio 2008\Projects\example\example\Debug\BuildLog.htm" 1>example - 11 error(s), 0 warning(s) ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
David R. Palmer wrote:
Okay, I downloaded the auto_link.hpp and placed it in the C:\Program Files\boost\boost_1_34_1\boost\config directory.
It is still looking for the older version of the libraries. The libraries have been built and exist, so that isn't the problem.
Any help would be appreciated. Thanks.
Strange, things to double check: That auto_link.hpp has the VC9 section: #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1500) // vc90: # define BOOST_LIB_TOOLSET "vc90" and that the header is actually being included rather than some other version (put a #error at the top of the file temporarily). HTH, John.
John Maddock wrote:
David R. Palmer wrote:
Okay, I downloaded the auto_link.hpp and placed it in the C:\Program Files\boost\boost_1_34_1\boost\config directory.
It is still looking for the older version of the libraries. The libraries have been built and exist, so that isn't the problem.
Any help would be appreciated. Thanks.
Strange, things to double check:
That auto_link.hpp has the VC9 section:
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1500) // vc90: # define BOOST_LIB_TOOLSET "vc90"
and that the header is actually being included rather than some other version (put a #error at the top of the file temporarily).
HTH, John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Thanks John, I did both, yes my auto_link.hpp is fresh from svn. When I placed an error message in the top, it came up in the VC build info, so it was found. Here is what I put in my user-config.jam file to build; # MSVC configuration using msvc : 9.0 : "C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe" ; # C:\Program Files\Microsoft Visual Studio 9.0\VC\bin and the libraries got built. Now here for the weird thing; In VC, when I open the auto_link.hpp file, #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310) // vc71: # define BOOST_LIB_TOOLSET "vc71" #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400) // vc80: # define BOOST_LIB_TOOLSET "vc80" #elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1500) // vc90: # define BOOST_LIB_TOOLSET "vc90" The line for vc80 is in blue, the lines for vc71 and vc90 are in gray. Makes me think VC thinks it is vc80. I am sooo rusty, this is probably meaningful and I am ignorant as to what it means. Clearly the compiler is vc90 as it is the express edition of 2008. Any help is gratefully appreciated. Dave
David R. Palmer wrote:
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
// vc71: # define BOOST_LIB_TOOLSET "vc71"
This line:
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
Is wrong, it should say: #elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400) Which confuses me, because it's never read the way you have it according to SVN history at http://svn.boost.org/trac/boost/browser/trunk/boost/config/auto_link.hpp Still confused, John.
John Maddock wrote:
David R. Palmer wrote:
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1310)
// vc71: # define BOOST_LIB_TOOLSET "vc71"
This line:
#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
Is wrong, it should say:
#elif defined(BOOST_MSVC) && (BOOST_MSVC == 1400)
Which confuses me, because it's never read the way you have it according to SVN history at http://svn.boost.org/trac/boost/browser/trunk/boost/config/auto_link.hpp
Still confused, John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
1>example - 0 error(s), 0 warning(s) ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========== Thanks John, I appreciate the help, now on to QuantLib!
Barberi wrote:
Newbie to boost. I used the MSVC 8.0 installer, and got the first couple of example programs to work, but failed on the regex example. I'm using MSVC 2008 (aka MSVC-9.0) (Express Edition) IDE, in Debug configuration. The linker can't resolve several symbols with libboost_regex_vc80-mt-gd-1_34_1.lib. Stripped of the qualifiers these are: _Orphan_all(void) const, ~_Container_base(void), _Swap_all(...), and insert(...). I switched to release configuration, now the linker looks in libboost_regex_vc80-mt-1_34_1.lib and can't find insert(...).
Any suggestions? Should I wait for a MSVC-9.0 installer, and go back to MSVC 2005 in the meantime?
The binary installer will install binaries compiled against VC8 (Visual Studio 2005) which probably won't work with VC9 as you have found. You could build the regex lib from source by following the instructions on the getting started page. Also remember also that the Regex lib is "just a bunch of source files": there's nothing magic about building them, so you can also build libs/regex/src/*.cpp to a static lib in your IDE and then add that project as a dependency to your application: make sure you define BOOST_REGEX_NO_LIB when building your .exe to suppress auto-linking if you take this route. HTH, John.
participants (3)
-
Barberi
-
David R. Palmer
-
John Maddock