netbeans中的C ++编译器错误 [英] C++ compiler error in netbeans

查看:201
本文介绍了netbeans中的C ++编译器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试过从阅读Netbeans帮助浏览Google的一切。
此代码在 Dev-Cpp 中正常工作,但不是 Netbeans 6.5.1 。 Netveans还在 #include< iostream> 旁边的地方和感叹号,我选中并位于netbeans的包含路径中,并位于include文件夹中:

I've tried everything from reading the Netbeans help to browsing Google. This code works fine in Dev-Cpp but not Netbeans 6.5.1. Netveans also places and exclamation mark next to #include <iostream> which i checked and is in the include path of netbeans and is in the include folder:

#include <iostream>
int main() {
    std::cout << "Test"  << "\n";
    return (0);
}

我的构建工具设置为:

家庭: MinGW

基本目录 C:\Dev-Cpp\bin

C编译器 C:\Dev-Cpp \bin\gcc.exe

C ++编译器 C:\Dev-Cpp \bin\g ++。exe

Fortran编译器 C:\Dev-Cpp \bin\g77.exe

/ strong>: C:\Dev-Cpp \bin\make.exe

Debugger Command C:\Dev-Cpp \bin\gdb.exe

我收到错误:

Running "C:\Dev-Cpp\bin\make.exe  -f Makefile CONF=Debug" in C:\Documents and Settings\Babiker\Desktop\Temp\Test

! was unexpected at this time.

C:\Dev-Cpp\bin\make.exe: *** [.validate-impl] Error 255


Build failed. Exit value 2.


推荐答案

错误的原因是Netbeans与MinGW的make不兼容。

The cause of the error is that Netbeans is incompatible with MinGW's make.

您可以选择支持的make版本:

You have a choice of supported make versions:


  • Cygwin的制作。 Cygwin 是一种祝福。

  • MinGW自己的 MSYS ,它是一个GNU实用程序的集合,例如bash,make,gawk和grep,以允许构建依赖于传统UNIX工具的应用程序和程序。它也比Cygwin小得多的下载。

  • Cygwin's make. Cygwin is a blessing. It brings as much Unix to Windows as you'd like.
  • MinGW's own MSYS, which "is a collection of GNU utilities such as bash, make, gawk and grep to allow building of applications and programs which depend on traditionally UNIX tools to be present". It is also a much smaller download than Cygwin.

这篇关于netbeans中的C ++编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆