This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS:"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector;、第466行:错误#285:不允许限定名

Guru**** 2024750 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/865808/ccs-c-opt-ti-ccs920-ccs-tools-compiler-ti-cgt-c6000_8-3-4-include-libcxx-vector-line-466-error-285-qualified-name-is-not-allowed

工具/软件:Code Composer Studio

大家好、  

我尝试将 C/C++代码移植到 TSM320C6678、但我相信编译命令中不包含标准库的路径。  

请告诉我如何确保标准库包含更正.... (我不熟悉 CSS)

此致、


****为项目 hello_openmp 构建配置调试****

"C:\\opt\\ti\\ccs920\\ccs\\utils\\bin\\gmake"全部

编译文件:"../arK_io/test_arK_io.cpp"
调用:C6000编译器
"c:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/bin/cl6x -mv6600 --include_path="C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv --include_path="C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/common --include_path="C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/ark_matrix --include_path="C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp --include_path="C:--include_path="C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include --g --diag_warning=225 --diag_wrap=off --opt_ical_icon_prine_file_proc/opt_icon_prine_icon_iclect_prue_icon.obrand="-ov_iclect_file_/preparit_ication"-ov_ication"-opt_icon_ication"-ov_icon_icon_iclation_real-opt_icon_icon_icon_icon_icon_over-/over-prine_prine_icon_prine_

>>编译失败
ark_io/subdir_rules.mk:9:目标'ark_io/test_ark_io.obj'的配方失败
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第466行:错误#285:不允许限定名
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第466行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第467行:错误#285:不允许限定名称
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第467行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第606行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第609行:错误#20:标识符"const_reverse_iterator"未定义
"c:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第612行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第615行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第625行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第628行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2163行:错误#285:不允许限定名称
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2163行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2164行:错误#285:不允许限定名称
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2164行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2313行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第2316行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector "、第2319行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第2322行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第2332行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/vector、第2335行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1212行:错误#285:不允许限定名称
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1212行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1213行:错误#285:不允许限定名称
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1213行:错误#66:预期为";"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1282行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque、第1285行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque "、第1288行:错误#443:类模板的参数列表"std:__2::reverse_iterator"缺失
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque、第1291行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque、第1301行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/deque、第1304行:错误#20:标识符"const_reverse_iterator"未定义
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第1321行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第1322行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第2211行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第2212行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第2213行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第2214行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第2215行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第6226行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第6242行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第6247行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx/regex "、第6357行:错误#444:类模板的参数太少"std::分隔符:::vector"
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp、第1634行:错误#268:"STD::vector"不明确
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp "、第437行:错误#71:不允许输入不完整类型
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp "、第437行:错误#18:预期为")"
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp "、第1501行:错误#71:不允许不完整类型
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp "、第1501行:错误#18:预期为")"
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp "、第1515行:错误#71:不允许不完整类型
"C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp、第1515行:错误#18:预期为")"

内部错误:C:\opt\ti\ccs920\ccs\tools\compiler\ti-cgt-C6000_8.3.4\bin\acpia6x.exe 遇到分段错误
处理函数(未知或文件范围)时、文件 C:/Users/Mehdi-laptop/workspace_v9_2/hello_openmp/impcv/bitmap_image.hpp 第1675行

这是由 TI EABI C/C++解析器中的缺陷导致的。
TI 客户支持可能会建议解决方法来避免这种情况。

升级到编译器的最新版本可能会解决此问题。

在 E2E 支持论坛中联系 TI、网址 为 http://e2e.ti.com 、位于
"开发工具"、"TI C/C++编译器"。 请参阅标题为的链接
"提交问题"。

我们需要看到整个错误消息以及完整、可重现的消息
包括所有命令行选项的测试用例。
包含由选项--preproc_with_comment 创建的.pp 文件

gmake:***[arK_io/test_arK_io.obj]错误1.

****构建完成****

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    请参阅 TI OpenMP 解决方案的文档。  不幸的是,在第一页的末尾,它说...

    不支持 C++程序。

    谢谢、此致、

    乔治

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    感谢您的意见。。 这很不幸… :(

    我在 Sys/BIOS 内核上看到了以下内容。

    第12页   

    1.1什么是 SYS/BIOS? SYS/BIOS 是一种可扩展的实时内核。 它专为需要实时调度和同步或实时仪表的应用而设计。 SYS/BIOS 提供抢先式多线程、硬件抽象、实时分析和配置工具。 SYS/BIOS 有助于最大限度地降低目标上的内存和 CPU 要求。 请观看介绍 SYS/BIOS 的视频以了解概述。

    是否有机会以 CPP 编程方式编写多线程代码?

    请告诉我

    谢谢你

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    此外、我们还有另一种选择、就是在 OpenMP 创建的每个 C 线程中调用 CPP 函数。 (如下所示)

    // test.cpp

    #include 
    
    模板 
    t get_thread_id (t tid){
    返回 tid + 1;
    }
    
    char* hello_thread (int tid){
    char * buf = new char[50];
    sprintf (buf、"hello thread %d"、get_thread_id (tid));
    返回 buf;
    }
    

    // main.c

    #include 
    #include 
    
    charg* hello_thread (int tid);
    
    int main (int argc、char * argv[]){
    
    int nthread、tid;
    
    // Fork 一组线程为他们提供了自己的变量副本*/
    #pragma omp parallel private (nthreads、tid)
    {
    
    //获取线程编号*/
    tid = omp_get_thread (
    "
    、%tinf);(") hello ("、tif)、tid ("(")、tif)
    /*只有主线程执行此操作*/
    if (tid =0)
    {
    nthreads = omp_get_num_threads();
    printf ("线程数=%d\n"、nthreads);
    }
    
    }/*所有线程都加入主线程并取消频带*/
    
    返回0;
    } 

    但显然它不会编译… :-(由于某种原因,它找不到参考文献(见下文)  

    任何线索或可能的替代方法都值得赞赏。  

    
    
    
    /ti/pdk_c667x_2_0_12/packages /ti/framework_components_3_40_02_07/examples
    :C:C:C:/ti/openmp_dsp_c667x_2_06_02_01/packages;C:C:C:/omp_config.cfg;调用:XDCtools "C:/opt/ti/ccs920/xdctools_3_60_01_27_core/xs /ti/linalg_1_2_0_0/packages /ti/ipc_3_50_03_04/packages /ti/ctoolslib_2_2_0_0/packages /ti/ndk_3_40_01_01/packages /ti/xdais_7_24_00_04/examples - xdcpath="C:ti;C:/ti/framework_components_3_40_02_07/packages /ti/bios_6_73_01_01/packages /ti/edma3_lld_2_12_05_30C/packages /ti/uia_2_30_01_02/packages ti.runtime.openmp.platforms.evm6678;C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:/ti/openmp_dsp_c667x_2_06_02_01/packages/ti/runtime/openmp/platforms;/ti/libarch_1_0_0_0/packages;C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C:C /ti/xdais_7_24_00_04/packages /opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4
    正在为软件包 configPkg 生成接口(因为 package/package.xdc.inc 比 package.XDC 旧)...
    从 package/cfg/omp_config_pe66.cfg 配置 omp_config.xe66 ...
    为设备配置 OpenMP 运行时:TMS320C6678
    生成自定义 ti.sysbios 库 makefile ...
    链接库 ti.drv.qms:./lib/c66/ti.drv.qmss.ae66
    链接库 ti.csl:./lib/c6678/c66/release/ti.csl.ae66
    正在开始构建库源...
    制作 C:/Users/mike-laptop/workspace_v9_2/hello_openmp/src/sysbios/sysbios.ae66 ...
    已完成库构建。
    cle66软件包/cfg/omp_config_pe66.c……
    已完成构建:"./omp_config.cfg
    
    "构建文件:"./hello.c"
    调用:C6000编译器
    "C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/bin/cl6x /Users/mike-laptop/workspace_v9_2/hello_openmp/ark_matrix /opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx -mv6600 -include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp/impcv /Users/mike-laptop/workspace_v9_2/hello_openmp -include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp/common /opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include -include_path="C:cp-refus_probulation="c:ctrabout_probe.com_prob_probe.cmp_probe.compr_prob_prob_probe.com_prob_prob_probe.cp -
    
    
    cp:-rom_prob_prob_prob_prob_rom_probulation="C:-ctrab_\cp_probe.com_prob_probe.com_prob_probe.cmp_probe.cmp_prob_probe.com_prob_probe.com_prob_prob_probe.com_probe.cmp_probe.com_probe.com_probe.com_file.
    c6000编译
    器"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/bin/cl6x -mv6600 --include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp/impcv --include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp/common --include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp/ark_matrix --include_path="C:/Users/mike-laptop/workspace_v9_2/hello_openmp --include_path="C:
    
    
    
    
    /opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/bin/cl6x --include_path="C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include --include_path="C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include/libcxx --cpp_probot_warning="-ccpp:opt_building_det_warning="cpremote_cp -out_probe.cpp --trending="-cpremot_probe.cmpremot_probe.cmpremot_probe.cmpremot_probe.cmp_display_display_display_probulation="-cp --opt_display_probot_probot_display_display_probulation_sbot_display_probe.cpp -out.cpp -out.cpp:-out_probot_probe.premot_probulation_sbulation_sbe.premot_display_ display_error_number --openmp -z -m"hello_openmp.map"-i"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/lib -i"C:/opt/ti/ccs920/ccs/tools/compiler/ti-cgt-c6000_8.3.4/include -reread_libs -diag_wrap=off -display_error_number -warn_sections -xml_link_info="hello_configmp_linkInfo.obj ---lhello_rom_test_rom.cn/l"-hello.c/opencpp -rom_out"-l_linker .cn/openmp.obj
    
    "configPkg/linker.cmd"、第118行:警告#10068-D:不匹配段
    警告#10247-D:在没有段规范
    的情况下创建输出段".tbss"警告#10247-D:在没有段规范
    
    未定义的第一个引用
    符号的情况下创建输出段".tdata" 文件中
    ------ --------
    hello_thread ./hello.obj
    
    错误#10234-D:未解析的符号仍存在
    错误#10010:链接期间遇到错误;"hello_openmp.out"未生成
    
    >>编译失败
    makefile:140:目标'hello_openmp.out'的配方失败
    gmake:***[hello_openmp.out]错误1
    
    ****编译完成**** 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我建议您从 TI 的一些示例开始、而不是从头开始构建项目。  访问 TI OpenMP 页面。  查看支持的 SoC (片上系统)和相关系统的列表。  对于每个 SDK、都显示了一个 SDK (软件开发套件)。  安装相应的 SDK 并浏览其中包含的示例。  其中一个可能接近您想要实现的目标。

    谢谢、此致、

    乔治