Boost logo

Boost Users :

From: John Maddock (john_maddock_at_[hidden])
Date: 2003-04-16 06:11:55


> I am having trouble with regex on an Alpha-Dec with Compaq's compiler 6.3.
>
> I've got regex to compile with generic.mak as follows:
>
> CXX="cxx" CXXFLAGS="-inline-none" -D__USE_STD_IOSTREAM
> -DBOOST_REGEX_NO_EXTERNAL_TEMPLATES" LINKER="cxx" gnumake generic.mak
>
> but then it comes to the link step an error occures:
>
> ld:
> Unresolved:
> main

wierd, do compaq shared libs require a main?

> Nevertheless, boost_regex.so is being build, but when I try to link an
> application with boost_regex.so I do get loads of errors concerning the
> C++ standard library:
>
>
> ld (prelink):
> /usr/lib/cmplrs/cxx/V6.3-008/libcxxstd.a(cxxl_std_init.o): std::cout:
> multiply defined
> Warning: std::basic_string<char, std::char_traits<char>,
> std::allocator<char> >::npos defined as GLOBAL RCONST but is defined in
> a shared lib as a GLOBAL OBJECT
> Warning: std::basic_string<wchar_t, std::char_traits<wchar_t>,
> std::allocator<wchar_t> >::npos defined as GLOBAL RCONST but is defined
> in a shared lib as a GLOBAL OBJECT
> Warning: std::locale::collate defined as GLOBAL RCONST but is defined in
> a shared lib as a GLOBAL OBJECT
> Warning: std::locale::ctype defined as GLOBAL RCONST but is defined in a
> shared lib as a GLOBAL OBJECT
> Warning: std::locale::monetary defined as GLOBAL RCONST but is defined
> in a shared lib as a GLOBAL OBJECT
> Warning: std::locale::numeric defined as GLOBAL RCONST but is defined in
> a shared lib as a GLOBAL OBJECT

Looks like the std lib deffinitions are being duplicated in the regex .so,
there may be some define you can set to suppress this, but otherwise, can
you build as a static library (either use bjam or else just compile all the
source files and put them in a shared lib using your usual build tool -
there is nothing special going on here).

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