Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
编译C++程序中的致命错误_C++_Eclipse_Windows - Fatal编程技术网

编译C++程序中的致命错误

编译C++程序中的致命错误,c++,eclipse,windows,C++,Eclipse,Windows,我使用Eclipse KePube作为C++,在编译一个简单的Hello World程序时,我看到了这个错误。 c:\mingw\include\_mingw.h:73:20: fatal error: w32api.h: No such file or directory 而整个窗户都在咆哮 09:15:59 **** Incremental Build of configuration Debug for project project1 **** Info: Internal Build

我使用Eclipse KePube作为C++,在编译一个简单的Hello World程序时,我看到了这个错误。
c:\mingw\include\_mingw.h:73:20: fatal error: w32api.h: No such file or directory
而整个窗户都在咆哮

09:15:59 **** Incremental Build of configuration Debug for project project1 ****
Info: Internal Builder is used for build
g++ "-IC:\\MinGW\\lib\\gcc\\mingw32\\5.3.0\\include\\c++" "-IC:\\MinGW\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\backward" "-IC:\\MinGW\\lib\\gcc\\mingw32\\5.3.0\\include" "-IC:\\MinGW\\lib\\gcc\\mingw32\\5.3.0\\include-fixed" "-IC:\\MinGW\\lib\\gcc\\mingw32\\5.3.0\\include\\c++\\mingw32" "-IC:\\MinGW\\include" -O0 -g3 -Wall -c -fmessage-length=0 -o "src\\project1.o" "..\\src\\project1.cpp" 
In file included from c:\mingw\include\wchar.h:53:0,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\cwchar:44,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\bits\postypes.h:40,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iosfwd:40,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ios:38,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\ostream:38,
                 from c:\mingw\lib\gcc\mingw32\5.3.0\include\c++\iostream:39,
                 from ..\src\project1.cpp:2:
c:\mingw\include\_mingw.h:73:20: fatal error: w32api.h: No such file or directory
compilation terminated.

09:16:01 Build Finished (took 2s.535ms)
我能做什么? 我的密码是

#include <iostream>
using namespace std;
int main()
{
     cout<<"hello world";
}

问题与MinGW安装程序有关。有一个包必须安装,但它没有安装。转到MinGW安装程序并添加ming-w32-w32.api,然后从安装菜单应用更改。

问题与MinGW安装程序有关。有一个包必须安装,但它没有安装。转到MinGW安装程序并添加ming-w32-w32.api,然后从安装菜单应用更改。

在我的例子中,我解决了如下问题:

转到MinGW安装管理器。 从安装列表中选择基本设置,并勾选程序包mingw32基本箱。 从“安装”选项卡中选择“应用更改”。
在我的情况下,我解决了如下问题:

转到MinGW安装管理器。 从安装列表中选择基本设置,并勾选程序包mingw32基本箱。 从“安装”选项卡中选择“应用更改”。 这是我的代码——包括使用名称空间std;int main{cout这是我的代码——包括使用命名空间std;int main{cout