
Hello all,
I am trying to evaluate boost, I've heard some good things about it...
I've managed to set it up mostly successfully.
On boosts page:
http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#get-b...
I've managed to compile the first program which does not use any
separately compiled libs..
When I try to compile the second program which uses the regex lib, I get
a link error...
There are many link errors, but I am only posting the first one from
gcc's output:
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
Maybe I don't need to include all those libs, but I keep adding libs,
hoping that something will work
Also, if I remove the args to boost::regex,
boost::regex pat("^Subject: (Re: |Aw: )*(.*)");
to
boost::regex pat();
then the software compiles with no warnings...
Anyone know what's up here? Oh, I'm using this on windows (MinGW - g++)
now, but once its working here I'll need to redo it all on Linux (Mandriva).
Thanks...
John
/***************************************************************************/
#include