Boost logo

Boost Users :

Subject: [Boost-users] boost_regex link problems
From: Colin Hercus (colinhercus_at_[hidden])
Date: 2009-02-19 05:24:23


Hi,

I'm trying to use Boost regex for the first time and I'm having trouble
getting libboost_regex to link.

The libraries are in /usr/lib64 and I try adding -lboost_regex to CC command
and also explicitly adding /usr/lib64/libboost_regex.so or .a but I keep
getting the same linker errors whether the library is specified or not.

I'm using Sun Studio 12.

What am I doing wrong?

Colin

Running "/opt/sun/sunstudio12/bin/dmake -f Makefile CONF=Release" in
/home/sparks/NovoCraft/ssp/novoalign

dmake: defaulting to parallel mode.
See the man page dmake(1) for more information on setting up the .dmakerc
file.
linuxpc --> 1 job
/opt/sun/sunstudio12/bin/dmake -f nbproject/Makefile-Release.mk SUBPROJECTS=
.build-conf
linuxpc --> 1 job
mkdir -p ../../sunbin
CC -m64 -features=zla -staticlib=Cstd -staticlib=Crun --print-map
>../../maps/novoalign.map -o ../../sunbin/novoalign
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/wmsearch.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/ksgroups.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/nawm.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/queryformat.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/queryfolder.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/keygen.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/ksindex.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/iubcodes.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/needle.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/TThread.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/shortnw.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/fragdist.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/novoparam.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/queryreader.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/posteriorP.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/qualconvert.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/TTimer.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/TThreadPool.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/rptsyncio.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/findamate.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/license.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/qryopt.o
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/novopaired_main.o
/usr/lib64/libboost_regex.a -lpthread -lz /usr/lib64/libcrypto.a
CC: Warning: Option --print-map passed to ld, if ld is invoked, ignored
otherwise
(/home/sparks/NovoCraft/ssp/novoalign)build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/wmsearch.o:
.
.
.:(/home/sparks/NovoCraft/ssp/novoalign)build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/novopaired_main.o
(/home/sparks/NovoCraft/ssp/novoalign)/usr/lib64/libboost_regex.a:
:(/home/sparks/NovoCraft/ssp/novoalign)/usr/lib64/libboost_regex.a
(/home/sparks/NovoCraft/ssp/novoalign)/usr/lib64/libcrypto.a:
:(/home/sparks/NovoCraft/ssp/novoalign)/usr/lib64/libcrypto.a
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/ksgroups.o:
In function `void
boost::re_detail::basic_regex_parser<char,boost::regex_traits<char,boost::cpp_regex_traits<char>
> >::parse(const char*,const char*,unsigned)':
ksgroups.cc:(.text%void
boost::re_detail::basic_regex_parser<char,boost::regex_traits<char,boost::cpp_regex_traits<char>
> >::parse(const char*,const char*,unsigned)[void
boost::re_detail::basic_regex_parser<char,boost::regex_traits<char,boost::cpp_regex_traits<char>
> >::parse(const char*,const char*,unsigned)]+0x28e): undefined reference to
`void boost::re_detail::raw_storage::resize(unsigned long)'
ksgroups.cc:(.text%void
boost::re_detail::basic_regex_parser<char,boost::regex_traits<char,boost::cpp_regex_traits<char>
> >::parse(const char*,const char*,unsigned)[void
boost::re_detail::basic_regex_parser<char,boost::regex_traits<char,boost::cpp_regex_traits<char>
> >::parse(const char*,const char*,unsigned)]+0x2f8): undefined reference to
`void boost::re_detail::raw_storage::resize(unsigned long)'
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/ksgroups.o:
In function `bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()':
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x17): undefined reference to
`void*boost::re_detail::get_mem_block()'
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x128): undefined reference to `void
boost::re_detail::verify_options(unsigned,boost::regex_constants::_match_flags)'
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x186): undefined reference to `void
boost::re_detail::put_mem_block(void*)'
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x1a3): undefined reference to `void
boost::re_detail::put_mem_block(void*)'
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x1ff): undefined reference to `void
boost::re_detail::put_mem_block(void*)'
ksgroups.cc:(.text%bool boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> > >::match()[bool
boost::re_detail::perl_matcher<const
char*,std::allocator<boost::sub_match<const char*>
>,boost::regex_traits<char,boost::cpp_regex_traits<char> >
>::match()]+0x230): undefined reference to `void
boost::re_detail::put_mem_block(void*)'
build/Release/Sun12-Linux-x86/_ext/home/sparks/NovoCraft/ssp/novoalign/../../src/ksgroups.o:
In function
`boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char>
>boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,boost::re_detail::cpp_regex_traits_implementation<char>
>::do_get(const boost::re_detail::cpp_regex_traits_base<char>&,unsigned
long)':
ksgroups.cc:(.text%boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char>
>boost::object_cache<boost::re_detail::cpp_regex_traits_base<char>,boost::re_detail::cpp_regex_traits_implementation<char>
>::do_get(const boost::re_detail::cpp_regex_traits_base<char>&,unsigned
long)[boost::shared_ptr<boost::re_detail::cpp_regex_traits_implementation<char>



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