Boost logo

Boost :

From: Tim Hawes (Tim.Hawes_at_[hidden])
Date: 2002-04-24 16:11:44

I am not able to get the regex shared library compiled. I am not
concerned about this so much as I am about this error I get when I try
to compile a program linked with boost regex:

c++ -I/usr/local/gcc/gcc-3.0.4/include/stlport
-I/usr/local/gcc/gcc-3.0.4/boost -c test.cpp
c++ -g3 -o test

Undefined first referenced
 symbol in file
_STL::char_traits<char>, _STL::allocator<char> >&, char const*)test.o
_STL::char_traits<char>, _STL::allocator<char> >&,
_STL::basic_string<char, _STL::char_traits<char>, _STL::allocator<char>
> const&)test.o
_STL::char_traits<char>, _STL::allocator<char> >&,
_STL::basic_string<char, _STL::char_traits<char>, _STL::allocator<char>
> const&)test.o
ld: fatal: Symbol referencing errors. No output written to test
collect2: ld returned 1 exit status

#include <boost/regex.hpp>
#include <iostream>

int main()
        boost::regex stitle("(.)*<title>(.)*",boost::regbase::icase); //
Find <title></title> tags.
        boost::regex meta("(.)*META name=\"SectionMember\"(.)*"); //
Find sectionmember meta tag.
        boost::RegEx *re = new boost::RegEx();
        _STL::cout << "Hello World!" << _STL::endl;
        delete re;
        return 0;

This compiles fine under Linux w/ a similar setup (gcc-3.0.4 from debian
distribution, stlport and boost I compiled myself).

Boost list run by bdawes at, gregod at, cpdaniel at, john at