Netbeans IDE 7.2.1:如何添加 c++ boost 库

2023-08-27C/C++开发问题
0

本文介绍了Netbeans IDE 7.2.1:如何添加 c++ boost 库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

对于我的下一个任务,我需要在 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 库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6