当编译只有一个main.cpp文件的OpenMP工程时,如果代码中使用的STL库,编译器会报内部错误,语言标准为C++14,器件为c6678。main.cpp代码如下:
#include <vector> struct ABC{ float *data; } void test_fxn(const std::vector<ABC>& obj) { float * data=obj[0].data; }
报如下错误:
**** Build of configuration Debug for project test **** "C:\\ti\\ccs930\\ccs\\utils\\bin\\gmake" -k -j 64 all -O Building file: "../main.cpp" Invoking: C6000 Compiler "C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/bin/cl6x" -mv6600 --include_path="C:/Users/YuHaoxin/Documents/CCS_Workspace/test" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" -g --c99 --c++14 --diag_warning=225 --diag_wrap=off --display_error_number --multithread --openmp --preproc_with_compile --preproc_dependency="main.d_raw" --cmd_file="C:/Users/YuHaoxin/Documents/CCS_Workspace/cfg/Debug/configPkg/compiler.opt" "../main.cpp" >> Compilation failure subdir_rules.mk:9: recipe for target 'main.obj' failed INTERNAL ERROR: C:\ti\ccs930\ccs\tools\compiler\ti-cgt-c6000_8.3.8\bin\acpia6x.exe experienced a segmentation fault while processing function (unknown or file scope) file ../main.cpp line 9 This is caused by a defect in the TI EABI C/C++ Parser. TI Customer Support may be able to suggest a workaround to avoid this. Upgrading to the newest version of the compiler may fix this problem. Contact TI in the E2E support forums at http://e2e.ti.com under "Development Tools", "TI C/C++ Compiler". See the link titled "Submitting an issue". We need to see this ENTIRE error message and a complete, reproducible test case including ALL of the command-line options. Include the .pp file created by option --preproc_with_comment gmake: *** [main.obj] Error 1 gmake: Target 'all' not remade because of errors. **** Build Finished ****
编译选项为:
-mv6600 --include_path="C:/Users/YuHaoxin/Documents/CCS_Workspace/test" --include_path="C:/ti/ccs930/ccs/tools/compiler/ti-cgt-c6000_8.3.8/include" -g --c99 --c++14 --diag_warning=225 --diag_wrap=off --display_error_number --multithread --openmp如果去除"--openmp"选项,则编译通过。
我的项目需要同时用的Openmp和C++14的STL,请问该如何解决这个问题?