在 Netbeans 7.0 中包含 C++ 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7799493/
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
Include C++ library in Netbeans 7.0
提问by PortalHymaner
I'm trying the use this library (RollPlay)in my project but I don't know how to include it in my C++ project in Netbeans. Would I just add the .dll and .h files into the project folder, add the files to the project? I'm new to Netbeans and using non built-in libraries.
我正在尝试在我的项目中使用这个库 (RollPlay),但我不知道如何将它包含在 Netbeans 的 C++ 项目中。我只是将 .dll 和 .h 文件添加到项目文件夹中,将文件添加到项目中吗?我是 Netbeans 的新手并使用非内置库。
采纳答案by Captain Giraffe
A library would normally reside in its own installation directory so you would need to point NB to where that is. If you right-click the project name in the "Projects" window, you'll have a Properties option.
库通常驻留在其自己的安装目录中,因此您需要将 NB 指向该目录。如果在“项目”窗口中右键单击项目名称,您将有一个属性选项。
- Select the Build/C++ compiler option to add the directory for the .h files.
- Select the Build/Linker to add the directory for the dll file.
- 选择 Build/C++ 编译器选项以添加 .h 文件的目录。
- 选择 Build/Linker 以添加 dll 文件的目录。