Boost logo

Boost Users :

Subject: Re: [Boost-users] Multiple link errors when using boost 1.44 boost::filesystem and gcc 4.1.2 on CentOS 5.5
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2010-08-29 02:46:08

Potato Soup wrote:

> I have installed gcc 4.1.2 (from Cent OS 5.5 repos), boost 1.44, and built all
> the libraries. I am able to link to all other libraries I try. As soon as I so
> much as add the include for boost::filesystem, and attempt to build my single
> .cpp file, I get the following errors:
> In function `__static_initialization_and_destruction_0(int, int)':
> testbuild.cpp:(.text+0xfa): undefined reference to
> `boost::system::generic_category()'
> testbuild.cpp:(.text+0x106): undefined reference to
> `boost::system::generic_category()'
> testbuild.cpp:(.text+0x112): undefined reference to
> `boost::system::system_category()'
> collect2: ld returned 1 exit status
> The linking stage fails and despite hours of googling I see no clear solution. I
> would be grateful for any advice on how to move past this, as it's the only
> thing holding me back from developing with boost. To be clear again, simply
> including <boost/filesystem.hpp> is enough to cause this when performing a link
> against libboost_filesystem.a.

I recommend you read

which even uses this specific error as example.

- Volodya

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at