Boost logo

Boost Users :

From: Benjamin Kaiser [gamigo AG] (bkaiser_at_[hidden])
Date: 2004-03-16 11:26:00


Hello,

I'm using the boost library for the first time, and I get a compiler error.
:-(
I don't know why, because I think the boost library is installed successful
(I have tested the SuSE rpm file and the download version from boost.org)...
I'm using gcc 3.x and boost 1.30 on SuSE Linux 9.0...

Header file:
-------------------------------------------
#include <string>
#include <fstream>
#include <syslog.h>
#include <boost/regex.hpp>
#include <vector>

using namespace boost;
-------------------------------------------

CPP file:
-------------------------------------------
...
regex expression("([0-9]+)(\\-| |$)(.*)");
...
-------------------------------------------

Thats all I do alluded to the boost regex library... if I want to compile
the files, I get the following compiling error:

-------------------------------------------
#g++ -ansi -pedantic-errors -Wall -o statd ./projekt/statd.cpp
compiling C++ using -ansi -pedantic-errors -Wall -o statd
/tmp/cc2KYvxs.o(.text+0x1951): In function `Accounting::SaveTraffic()':
: undefined reference to `boost::reg_expression<char,
boost::regex_traits<char>, std::allocator<char>
>::reg_expression[in-charge](char const*, unsigned, std::allocator<char>
const&)'
/tmp/cc2KYvxs.o(.text+0x1994): In function `Accounting::SaveTraffic()':
: undefined reference to `boost::reg_expression<char,
boost::regex_traits<char>, std::allocator<char> >::~reg_expression
[in-charge]()'
collect2: ld returned 1 exit status
-------------------------------------------

It would be nice if someone can help me with this problem... I'm new at C++
and don't know how to fix this. :-(
If I only include the regex.hpp and do the "using namespace boost"
everything is compiling fine. Only if I do the "regex expression(...)" in
the CPP File I get the errors... :-(

Many thanks for help!
If someone will help me via ICQ: 20320644

Mit freundlichen Grüßen / With best regards

Benjamin Kaiser
Systemprogrammierer
gamigo® AG -Deutschland -
Butterstr. 13
48431 Rheine
Tel. +49 5971-899060
Fax +49 5971-8990611
bkaiser_at_[hidden]
(DH/DSS) PGP-Key auf Anfrage / PGP-Key on request!
--------------------------------------------------
Diese E-Mail enthält vertrauliche und / oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte
Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If
you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.


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