delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/09/18:17:44

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Subject: Re: DJGPP and the Boost library?
Newsgroups: comp.os.msdos.djgpp
References: <db3559c4 DOT 0301091249 DOT 352a0699 AT posting DOT google DOT com>
User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (SunOS/5.8 (sun4u))
Message-ID: <1042153906.482573@queeg.ludd.luth.se>
Cache-Post-Path: queeg.ludd.luth.se!unknown AT brother DOT ludd DOT luth DOT se
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
Date: 09 Jan 2003 23:11:46 GMT
Lines: 44
NNTP-Posting-Host: queeg.ludd.luth.se
X-Trace: 1042153906 news.luth.se 26543 130.240.16.109
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Roger Dahl <rdnews AT dahlsys DOT com> wrote:
: I'm trying to use the Regex++ part of the Boost library. The library
: compiles without any problems, but I get linker errors when I try to
: use it. Here's my test app:

: #include <boost/regex.hpp>

: int main() {
: 	boost::regex r("test");
: 	return 0;
: }

: When I try to link with the library, I get the following errors:

:>gpp.exe -O2 -Wall -L/djgpp/boost_1_29_0/libs/regex/build/gcc
: -lboost_regex -I/djgpp/boost_1_29_0 -o mapper.exe mapper.cpp

: d:/tmp/cc8e650b.o(.text+0x2d):mapper.cpp: 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&)'

: d:/tmp/cc8e650b.o(.text+0x35):mapper.cpp: undefined reference to
: `boost::reg_expression<char, boost::regex_traits<char>,
: std::allocator<char> >::~reg_expression [in-charge]()'

: Listing the symbols in my test app with nm, I can find undefined
: symbols like this one:
:  
: U boost::reg_expression<char,
: boost::regex_traits<char>,std::allocator<char> >::~reg_expression()
:  
: Listing the symbols in the library, I can find the same symbols again,
: but defined:
:  
: T boost::reg_expression<char,
: boost::regex_traits<char>,std::allocator<char> >::~reg_expression()

Link order. Put your libraries _last_.


Right,

						MartinS

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019