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.

[参考译文] CODECOMPOSER:在 c++/v1/__ERRC:142:43中生成带有 POSIX 和 C++代码的 CC1352项目失败:错误:使用未声明的标识符'EIDRM'

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1246654/codecomposer-build-of-cc1352-project-with-posix-and-c-code-fails-in-c-v1-__errc-142-43-error-use-of-undeclared-identifier-eidrm

器件型号:CODECOMPOSER

SDK 7.10.1.24

TI Clang v2.1.2.LTS

目标:CC1352R1

const Settings   = scripting.AddModule ("sysfg"/ti/posix/tirtos/Settings);在.sysfg 文件中指定

尝试编译工程时、会发生以下 C++工具链头文件中的错误:

In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/iomanip:47:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/istream:163:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/ostream:139:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/ios:214:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__locale:19:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/mutex:190:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__mutex_base:17:
In file included from /Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/system_error:146:
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:142:43: error: use of undeclared identifier 'EIDRM'
    identifier_removed                  = EIDRM,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:156:43: error: use of undeclared identifier 'ENOLINK'
    no_link                             = ENOLINK,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:161:43: error: use of undeclared identifier 'ENOMSG'
    no_message_available                = ENOMSG,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:163:43: error: use of undeclared identifier 'ENOMSG'
    no_message                          = ENOMSG,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:190:43: error: use of undeclared identifier 'EOWNERDEAD'
    owner_dead                          = EOWNERDEAD,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:198:43: error: use of undeclared identifier 'ENOTRECOVERABLE'
    state_not_recoverable               = ENOTRECOVERABLE,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:204:43: error: use of undeclared identifier 'ETXTBSY'
    text_file_busy                      = ETXTBSY,
                                          ^
/Applications/ti/ccs1210/ccs/tools/compiler/ti-cgt-armllvm_2.1.2.LTS/include/c++/v1/__errc:209:43: error: use of undeclared identifier 'ELOOP'
    too_many_symbolic_link_levels       = ELOOP,

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

    忘记添加,主机操作系统是 Mac OS 13.4.1

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

    很遗憾、我无法重现此问题。

    请显示所有编译器选项。  复制并粘贴选项的文本、不要使用屏幕截图。

    如果可行、请更改出现此问题的源文件、使其只包含编译器包含目录中的标准头文件。 然后 其附加到您的下一篇文章。  由于论坛只接受几种不同类型的文件作为附件、因此添加文件扩展名 .txt 反馈回路。

    谢谢。此致、

    -乔治

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

    步骤:
    1. 根据 SDK 示例 collector_CC1352R1_LAUNCHXL_tirtos7_ticlang 创建工程

    2.添加文件 Test.cpp 和 Test.hpp

    Test.HPP 的内容:

    #pragma once
    
    #include <iomanip>
    #include <iostream>
    
    int Test_init();
    

    Test.cpp 的内容:

    #include <iomanip>
    #include <iostream>
    
    #include "Test.hpp"
    
    
    int Test_init() {
        std::cout << "default fill: [" << std::setw(10) << 42 << "]\n"
                      << "setfill('*'): [" << std::setfill('*')
                                           << std::setw(10) << 42 << "]\n";
        return 0;
    }

    3.在 main.c 的某个位置添加 Test_init()的调用

    4.尝试构建项目。

    结果:误差相同。


    如果需要、我可以发送一个包含项目的 zip 文件。 请告诉我如何上传文件到此处

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

    尊敬的 Serhii:

    以下是您看到的错误的修复方法:

    https://github.com/edgeimpulse/ei-ti-code-composer-examples#-error-use-of-undeclared-identifier-e-when-using-simplelink-cc13xx-cc26xx-sdk-54000406100000-tirtos-and-ticlang-130-lts

    但是、它看起来好像在我们的编译器中找不到 iomanip、从而产生另一个错误。

    此致、

    亚瑟

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

    很遗憾、回滚到 SDK 5.40对我们来说看起来不是一个很好的解决方案、因为它有以下问题、我在 升级到最新版本时尝试修复: e2e.ti.com/.../4665757

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

    尊敬的 Serhii:

    如果您继续阅读、它会提示您也可以修改 errno.h、这样您就可以保留现有的 SDK。

    此致、

    亚瑟

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

    谢谢、 这是 临时修复。


    您知道是否有任何 向上流化此修复的计划?

    此致、

    谢尔盖

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

    尊敬的 Serhii:

    不幸的是,据我所知,我们没有这样的计划。

    此致、

    亚瑟