From: Martin Str|mberg Subject: Re: DJGPP and the Boost library? Newsgroups: comp.os.msdos.djgpp References: 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 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 : 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, : std::allocator >::reg_expression[in-charge](char const*, : unsigned, std::allocator const&)' : d:/tmp/cc8e650b.o(.text+0x35):mapper.cpp: undefined reference to : `boost::reg_expression, : std::allocator >::~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,std::allocator >::~reg_expression() : : Listing the symbols in the library, I can find the same symbols again, : but defined: : : T boost::reg_expression,std::allocator >::~reg_expression() Link order. Put your libraries _last_. Right, MartinS