将 Boost 库添加到 Windows Eclipse 中的 C++ 项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2336211/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Adding Boost Library to a C++ project in Windows Eclipse
提问by kingrichard2005
I recently installed the Boost Library on Windows using the installer, I'm trying to link to the library in Eclipse but am not having any luck. I tried going through Project Properties -> C/C++ Build -> Settings -> MinGW C++ Linker -> Libraries and add the reference "boost_filesystem" according to this website: http://www.ferdychristant.com/blog//archive/DOMM-76JN6N, but I think that only applies to Unix variants. Everytime I compile I get the error: "cannot find -lboost_filesystem" . I've scoured the net, but cannot find a way to properly use Boost in Eclipse under a Windows platform. Any help or suggestions are appreciated.
我最近使用安装程序在 Windows 上安装了 Boost 库,我试图链接到 Eclipse 中的库,但没有任何运气。我尝试通过 Project Properties -> C/C++ Build -> Settings -> MinGW C++ Linker -> Libraries 并根据此网站添加参考“boost_filesystem”:http://www.ferdychristant.com/blog//archive/ DOMM-76JN6N,但我认为这仅适用于 Unix 变体。每次编译时,我都会收到错误消息: "cannot find -lboost_filesystem" 。我已经搜索了网络,但找不到在 Windows 平台下在 Eclipse 中正确使用 Boost 的方法。任何帮助或建议表示赞赏。
采纳答案by RP.
I think Eclipse for Visual Studio C++ Developers ( also has explanations for boost library) ) is what you needed..
我认为Eclipse for Visual Studio C++ Developers(也有关于 boost 库的解释)是你所需要的。
回答by Pedro Polonia
Try to install the MinGW (GCC) Compiler Suite in c:\mingw
. Eclipse will detect the toolchain, that includes the boost library.
尝试在c:\mingw
. Eclipse 将检测工具链,其中包括 boost 库。