Hi,
I’ve just started trying to use the Regex library with g++ 3.4.4 under cygwin. I am using the boost 1_33_1 libraries that are installed by cygwin’s setup program. For some reason that I cannot figure out, building fails for this simple program test-regex.cpp :
#include <boost/regex.hpp>
using namespace boost;
int main() {
regex re;
re.assign("hey");
}
My build command is:
g++ -I/usr/include/boost-1_33_1 -lboost_regex-gcc-mt-s test-regex.cpp
Compilation is ok, but during linking I get:
/cygdrive/d/temp/ccrjdFg7.o:test-regex.cpp:(.text$_ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)]+0x22): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
collect2: ld returned 1 exit status
I cannot figure out how to solve this problem, and would be grateful if anyone can offer any help.
Thanks,
Darren Moore.