Eclipse:如何启用编译选项,在C++;,OpenCL程序 当我用Eclipse IDE为C/C++开发版本构建C++程序OpenCL时,我得到了这个错误:Luna Service Relp 2(4.4.2):
我可以通过终端($g++…)成功地编译它Eclipse:如何启用编译选项,在C++;,OpenCL程序 当我用Eclipse IDE为C/C++开发版本构建C++程序OpenCL时,我得到了这个错误:Luna Service Relp 2(4.4.2):,c++,eclipse,build,compiler-errors,opencl,C++,Eclipse,Build,Compiler Errors,Opencl,我可以通过终端($g++…)成功地编译它 如何解决此问题?在project Explorer->Properties->C/C++Build->Settings中右键单击您的项目 在工具设置选项卡中,有一个GCC C++编译器项目。展开它并选择设置->混合 在其他标志文本的末尾追加字符串-std=c++11 这应该针对您需要的任何配置进行。将-opencl添加到标志中。Project Explorer->Properties->C/C++Build->您正在使用的编译器->miscellaneo
如何解决此问题?在project Explorer->Properties->C/C++Build->Settings中右键单击您的项目
在工具设置选项卡中,有一个GCC C++编译器项目。展开它并选择设置->混合
在其他标志文本的末尾追加字符串-std=c++11
这应该针对您需要的任何配置进行。将-opencl添加到标志中。Project Explorer->Properties->C/C++Build->您正在使用的编译器->miscellaneous.非常感谢@Paolo M,但是在我这样做之后,我得到了很多关于OpenCL指令的错误(25个错误),比如:Description Resource Path Location Type undefined reference to`clCreateBuffer'SNM.cpp/SNM/src line 176 C/C++问题
Description Resource Path Location Type
#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. SNM line 32, external location: /usr/include/c++/4.8/bits/c++0x_warning.h C/C++ Problem