无法在Eclipse中构建项目

时间:2013-07-07 20:56:04

标签: c++ eclipse opengl glut

我使用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

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

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

编辑:= 溶液

在将 -std = c ++ 11 附加到命令行时添加空格。

1 个答案:

答案 0 :(得分:2)

在将-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};