Opened 11 years ago
Closed 11 years ago
#6330 closed Bugs (worksforme)
Sucess to build when use stlport 5.2.1, but link error.(MSVC8-10)
Reported by: | Owned by: | John Maddock | |
---|---|---|---|
Milestone: | To Be Determined | Component: | regex |
Version: | Boost 1.48.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Boost 1.48.0 success to build when use stlport 5.2.1, but when link to the library with following error: error LNK2001: unresolved external symbol "void cdecl boost::re_detail::raise_runtime_error(class stlpd_std::runtime_error const &)" (?raise_runtime_error@re_detail@boost@@YAXAEBVruntime_error@stlpd_std@@@Z) E:\WorkSpaces\Visual Studio 2010\boost_test\boost_test\main.obj error LNK2001: unresolved external symbol "class stlpd_std::basic_string<char,class stlpd_std::char_traits<char>,class stlpd_std::allocator<char> > cdecl boost::re_detail::w32_transform(unsigned int,char const *,char const *)" (?w32_transform@re_detail@boost@@YA?AV?$basic_string@DV?$char_traits@D@stlpd_std@@V?$allocator@D@2@@stlpd_std@@IPEBD0@Z) E:\WorkSpaces\Visual Studio 2010\boost_test\boost_test\main.obj
building configure for boost 1.48.0:
set PYTHON=D:
Program Files (x86)
Python32
set INCLUDE=%STLPORT%\stlport;%PYTHON%
include;%INCLUDE%;
set LIB=%STLPORT%
lib;%PYTHON%
libs;%LIB%;
b2 --toolset=msvc-10.0 --build-type=complete stdlib=stlport --stagedir=stlport
I have define _STLP_DEBUG and STLPORT_DEBUG in my project.During in the building progress of boost, I found the b2 have used the headers of msvc, and link to stplort's libraries.
This sort of issue is normally caused by some kind of binary incompatibilty between the libraries and your executable - unfortunately it's next to impossible to diagnose from a distance. The usual and easiest fix is to:
HTH, John.