我正在使用Netbeans 7.0并尝试编译和调试时出现此错误:
make: *** [.validate-impl] Error 127
BUILD FAILED (exit value 2, total time: 281ms)
我将环境变量(在Windows中)设置为C:\ cygwin \ bin
在Netbeans中,我的构建工具属于Cygwin家族。 C编译器为Gcc,C++编译器为G++,汇编器为as.exe,make命令为make.exe,调试器为gdb.exe。它们都位于C:\ cygwin \ bin \ FILENAMEHERE中
最后,我的源代码:
#include <iostream>
int main ()
{
std::cout << "Enter two numbers:" << std::endl;
int v1, v2;
std::cin >> v1 >> v2;
std::cout << "The sum of " << v1 "and " << v2 << "is" << v1 +v2 << std::endl;
return 0;
}
有什么建议?
最佳答案
7.0 C++版本存在很多问题。它不断破坏自动生成的make文件。我将其删除并降级。 6.9.1版本仍然可用,并且似乎工作得更好。
ps
如果您要进行QT开发,那么选择哪个编译器链就很重要。您要查找“mingw tdm dw2”。 mingw的SJLJ版本(默认设置)不适用于已发布的QT二进制库。
关于c++ - Netbeans 7.0编译器错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6153282/