开发者

Boost linking error for boost filesystem, why?

开发者 https://www.devze.com 2023-01-13 19:05 出处:网络
I have built boost 1.44 on CentOS 5.5 using the gcc that is part of CentOS 5.5. All targets built fine. However trying to build a simple cpp file with nothing but an include of boost filesystem result

I have built boost 1.44 on CentOS 5.5 using the gcc that is part of CentOS 5.5. All targets built fine. However trying to build a simple cpp file with nothing but an include of boost filesystem results in this linking error (3 times):

undefined reference to `boost::system::generic_category()'

I cannot see why this would happ开发者_Go百科en. The lib is build, it can be seen, and yet I've seen this error discussed in google searches for versions of boost going back quite a while (when built with gcc). Anyone have any suggestions?


Add -lboost_system to your LDFLAGS when linking your simple app.

0

精彩评论

暂无评论...
验证码 换一张
取 消