简体   繁体   English

使用NetBeans在C ++静态库项目中进行测试

[英]Test in a C++ static library project with NetBeans

I'm writing a static library in C++ with NetBeans (6.9.1). 我正在用NetBeans(6.9.1)用C ++写一个静态库。 I compiled the project main source files with no errors but I don't know how to add a test to it. 我没有任何错误地编译了项目的主要源文件,但是我不知道如何添加测试。

I chose File -> New -> C/C++ Tests -> C++ Simple Test and added the static library and the include directory to its properties but when I try to compile the test, I get the following error: 我选择了文件->新建-> C / C ++测试-> C ++简单测试,并将静态库和包含目录添加到其属性中,但是当我尝试编译测试时,出现以下错误:

make: * No rule to make target 使: *没有规则成为目标

Is it because the test file has to be defined in a new project outside of the library project? 是否因为必须在库项目之外的新项目中定义测试文件?

I've been trying to get around this one for a while. 我一直在努力解决这一问题。 Apparently it's a bug, due to be fixed by Netbeans 7.0. 显然,这是一个错误,已由Netbeans 7.0修复。 http://netbeans.org/bugzilla/show_bug.cgi?id=188854 http://netbeans.org/bugzilla/show_bug.cgi?id=188854

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

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