问题描述
对于我的下一个任务,我需要在 C++ 中进行线程处理,并且已经了解到用于线程处理的 boost 库工作得相当好.我从未在 Netbeans 中添加过自定义库,并且希望有人可以为我提供一些可遵循的步骤,以便我能够#include 它并在我的课堂中使用它.
For my next assignment I require threading in C++ and have read that the boost library for threading works fairly well. I've never added a custom library to Netbeans and was hoping someone could provide me some steps to follow in order to allow me to #include it and use it in my class.
到目前为止,我已经下载了以下内容:来自这里的 Boost 库:http://sourceforge.net/projects/boost/files/boost/1.52.0/(不确定我在哪里提取它是否也很重要.我假设我需要将 NetBeans 设置为在我的包属性中的某个位置指向它?)
So far I've downloaded the following: Boost library from here: http://sourceforge.net/projects/boost/files/boost/1.52.0/ (Not sure if it matters where I extract this too.. I'm assuming I need to set NetBeans to point at it somewhere within the properties of my package?)
适用于 Windows 的 NetBeans 7.2.1 C/C++ 安装程序来自此处:http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=cpp
NetBeans 7.2.1 C/C++ Installer for Windows from here: http://netbeans.org/downloads/start.html?platform=windows&lang=en&option=cpp
编译:MinGW
任何帮助都会很棒.谢谢!
Any help would be great. Thanks!
推荐答案
链接库:
项目 -> 属性 -> 链接器 -> 库 -> 添加选项 -> 其他 ->-l%libname%
Project -> properties -> Linker ->Libraries -> Add option -> Other -> -l%libname%
库路径:
项目 -> 属性 -> 链接器 -> 附加库目录
Project -> properties -> Linker -> Additional Library Directories
包括:
项目->属性->C++编译器->包含目录->%paths_to_boost%
Project -> properties -> C++ Compiler -> Include Directories -> %paths_to_boost%
这篇关于Netbeans IDE 7.2.1:如何添加 c++ boost 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!