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
/usr/local/gcc/gcc-3.0.4/boost/libs/regex/build/bin/libboost_regex.a/gcc-stlport/release/runtime-link-dynamic/libboost_regex.a
\
/usr/local/gcc/gcc-3.0.4/lib/libstlport_gcc.a

Undefined first referenced
 symbol in file
boost::re_detail::c_traits_base::do_lookup_collate(_STL::basic_string<char,
_STL::char_traits<char>, _STL::allocator<char> >&, char const*)test.o
boost::c_regex_traits<char>::transform(_STL::basic_string<char,
_STL::char_traits<char>, _STL::allocator<char> >&,
_STL::basic_string<char, _STL::char_traits<char>, _STL::allocator<char>
> const&)test.o
boost::c_regex_traits<char>::transform_primary(_STL::basic_string<char,
_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

test.cpp:
#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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk