开发者

Visual Studio linker cannot find libboost_system

I'm using VS 2008 and want to use the boost::asio library. I could get this to work in a new project (I want to include boost/bind.hpp and boost/asio.hpp), but 开发者_如何学Cin an existing project I get this error:

fatal error LNK1104: Datei "libboost_system-vc90-mt-sgd-1_46.lib" cannot be found.

I can't find this file in the boost directory, but this one: libboost_system-vc90-mt-gd-1_46.lib (gd instead of sgd) What could that mean?

Thank you!


I assume you've used the Boost installer from BoostPro. If so reinstall it and make sure you select Multithread Debug, static runtime.


Boost names its libraries based on what options were used in compiling them. "mt," for instance, means "multi-threaded runtime"; and I'm sure you can figure out what "vc90" means (compared to, say, "gcc4"). I think the "s" means "static."

Your solution is to first make sure you're using the same options that were used in building the library, and then change the name of the file you're linking against in the project options.


It means you have to go to the project properties and change the name of the boost library that is currently included for linking. If you have libboost_system-vc90-mt-gd-1_46.lib, you should use it.

Configuration Properties => Linker => Input => Additional dependencies
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜