|
Boost Users : |
Subject: Re: [Boost-users] Boost.Regex Can't compile / link programs..
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-05-19 11:19:14
AMDG
John Mc Murray wrote:
> C:\DOCUME~1\John\LOCALS~1\Temp\ccgmT8rw.o:reg.cpp:(.text$_ZN5boost9re_detail27cpp_regex_traits_char_layerIcEC2ERKNS0_21cpp_regex_traits_baseIcEE[boost::re_detail::cpp_regex_traits_char_layer<char>::cpp_regex_traits_char_layer(boost::re_detail::cpp_regex_traits_base<char>
> const&)]+0x55): undefined reference to
> `boost::re_detail::cpp_regex_traits_char_layer<char>::init()'
>
> When I comment out the 3 lines in the code snippet below (marked with
> //comment out), but I leave the one line boost::smatch matches; it
> does compile..
>
> Does that mean that I have Regex installed correctly, but I am maybe
> missing a lib when I try to compile
>
> Here is how I'm trying to compile:
>
> g++ -I ../boost_1_43_0 -L ../boost_1_43_0/stage/lib -luser32 -lpthread
> -lboost_program_options-mgw44-mt-1_43 -lboost_regex-mgw44-mt-1_43
> -lboost_thread-mgw44-mt-1_43 -o r reg.cpp
You need to list libraries /after/ the files that uses them.
In Christ,
Steven Watanabe
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