简体   繁体   English

在Netbeans项目中包括C ++库源代码?

[英]Include C++ library source in Netbeans project?

Is there a "good" way to directly include a library's source in a Netbeans project? 有没有一种“好的”方法可以直接在Netbeans项目中包含库的源代码? When I try to do it, I add the include directory in the Linker options and src in the source directories but I get a ton of "undefined reference" errors unless I add the folder into the project using right click>add existing items from folder. 当我尝试执行此操作时,我在链接器选项中添加了include目录,在源目录中添加了src,但是除非遇到右键单击>从文件夹添加现有项将文件夹添加到项目中的问题,否则我会收到大量“未定义的引用”错误。 。

Is there a better way to do this without having all the the code in the project ? 有没有在项目中拥有所有代码的更好的方法吗?

Thanks a lot in advance for your answers 提前非常感谢您的回答

Try doing this: 尝试这样做:

Select Tools->Libraries from the menu, create a new library there, then on right side click " add Jar/folder " to insert your folder. 从菜单中选择“工具”->“库”,在此处创建一个新库,然后在右侧单击“ 添加Jar /文件夹 ”以插入您的文件夹。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM