Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/153.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
Can';t在Eclipse中构建项目 我用Eclipse C++编程语言使用明文编程。_C++_Eclipse_Opengl_Glut - Fatal编程技术网

Can';t在Eclipse中构建项目 我用Eclipse C++编程语言使用明文编程。

Can';t在Eclipse中构建项目 我用Eclipse C++编程语言使用明文编程。,c++,eclipse,opengl,glut,C++,Eclipse,Opengl,Glut,在此之前,我的项目运行良好:- 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 我这样

在此之前,我的项目运行良好:-

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

注意:-我这样声明了我的向量

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

它是什么版本的mingw gcc?删除
-std=c++11
是否解决了问题?@greatwolf是的,删除-std=c++11并将使用向量数组的行更改为简单的固定大小。向量cone1{0.0f,2.4f,-11.0f,/*旋转*/30.0f,-1.5f,0.0f,0.0f};到GLfloat cone1[]={0.0f,2.4f,-11.0f,/*旋转*/30.0f,-1.5,0.0,0.0};为什么不能在不添加该标志的情况下使用向量?你包括吗?@GCC404是的,我包括在内。但是如果没有标志,它会说(这个)[我认为在C++98中,你不能对向量使用这个构造函数。要创建一个新的向量,可以这样做:向量cone1;cone1.push_back(0.0f);cone1.push_back(这里的元素);要知道为什么它不编译C++11,请尝试更新你的编译器。
vector<GLfloat> cone1{1.0f, 3.0};