Boost logo

Boost Users :

From: John Maddock (john_at_[hidden])
Date: 2006-03-22 05:51:30


Phlip wrote:
> I just reproduced it again. Here's the setup:
>
> $(WIN32_TARGET):
> export STLPORT_PATH=../STLport-4.6.2/ ;\
> export MSVCDir=$VCINSTALLDIR ;\
> ./configure --with-toolset=vc-7_1-stlport
> --with-bjam=tools/build/jam_src/bin.ntx86/bjam.exe ;\
> tools/build/jam_src/bin.ntx86/bjam.exe "-sTOOLS=vc-7_1-stlport"
> --with-regex stage
>
> Then at link time, the application catches:
>
> unresolved external symbol "void __cdecl
> boost::re_detail::raise_runtime_error(class _STL::runtime_error const
> &)"...
>
> unresolved external symbol "class _STL::basic_string<char,class
> _STL::char_traits<char>,class _STL::allocator<char> > __cdecl
> boost::re_detail::w32_transform(unsigned long,char const *,char const
> *)"...
>
> So I copy and paste those into my application's cpp file, and they
> link. Then I crash here:

Linker errors are there to tell you something: the lib file you're linking
against is *not* binary compatible with your applications build options.

So.... are you letting autolink pick the right lib to link against or have
you over-riden an error there as well?
Are you defining __STL_DEBUG in debug builds? The bjam built libs do so,
and you'll need to define __STL_DEBUG to link against them. The autolink
code should have picked this one up however.

If all esle fails I suggest you build the regex lib from the IDE with
*exactly* the same options as your application: remember it's just a bunch
of sources, you can add the source code directly to your project as well if
you want (define BOOST_REGEX_NO_LIB to disable autolinking if you do so
however).

Hopefully that will clear the problem's you're seeing.

John.


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