无法在 Eclipse 中构建项目

Can't build project in Eclipse

本文关键字:构建 项目 Eclipse      更新时间:2023-10-16

我正在使用MinGW在Eclipse C++OpenGL中编程。

在我做这件事之前,我的项目运行得很好:-

Right-click on the the project and select "Properties"
Navigate to C/C++ Build -> Settings
Select the Tool Settings tab.
Navigate to GCC C++ Compiler -> Miscellaneous
In the option setting labeled Other Flags add -std=c++11

我这样做是因为我必须在代码中使用矢量数组。

问题是现在我无法构建我的项目。当我点击build时,它会100%生成,显示没有错误,但不会生成.exe文件。

编辑:=解决方案

-std=c++11追加到命令行时放置空格。

-std=c++11追加到命令行时放置空格。

以及改变

 cone1 {1.0f , 2.0f};

cone1 = {1.0f, 2.0f}; //problem fixed after doing this.

注意:-我像一样声明了我的矢量

vector<GLfloat> cone1{1.0f, 3.0};