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:缺少 TI-CGT-armllvm 4.0.x C++标头

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

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1520555/codecomposer-ti-cgt-armllvm-4-0-x-c-headers-missing

部件号:CODECOMPOSER

工具/软件:

您好:

我想将工具链版本从 ti-cgt-armllvm_3.2.LTS 切换到 ti-cgt-armllvm_4.0.3.LTS 、但无法编译与所使用的相同代码  3.2.2.

在4.0.x 中、编译失败、并出现以下错误:

/opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/cctype:43:5: error: <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header.           This usually means that your header search paths are not configured properly.            The header search paths should contain the C++ Standard Library headers before           any C Standard Library.
   43 | #   error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
      |     ^
In file included from main.cpp:4:
In file included from <some header path>.hpp:6:
In file included from <some header path>.hpp:7:
In file included from <some header path>.hpp:8:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/functional:526:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/vector:325:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__format/formatter_bool.h:20:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__format/formatter_integral.h:13:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__charconv/to_chars_integral.h:17:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__charconv/to_chars_result.h:14:
In file included from /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/__system_error/errc.h:104:
/opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1/cerrno:31:5: error: <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
   31 | #   error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
      |     ^
2 errors generated.


问题似乎是由包含路径太多引起的。  我已经通过 使用-E -v 调用/opt/ti-cgt-armllvm_4.0.0.LTS/bin/tiarmclang 来检查了用于编译的包含路径 头文件应该会显示在编译输出中、我可以看到:

ignoring duplicate directory "/opt/ti-cgt-armllvm_4.0.0.LTS/lib/clang/18/include"
#include "..." search starts here:
#include <...> search starts here:

my include paths....

 /opt/ti-cgt-armllvm_4.0.0.LTS/include/armv7r-ti-none-eabihf/c++/v1
 /opt/ti-cgt-armllvm_4.0.0.LTS/include/c++/v1
 /opt/ti-cgt-armllvm_4.0.0.LTS/lib/clang/18/include
 /opt/ti-cgt-armllvm_4.0.0.LTS/include/c

当我限制用于编译的包含路径数时、问题就消失了。

问题也出现在  4.0.3中

Include 路径编号的数量是否存在任何已知限制?  您能解决我这个问题吗?  

此致、
Slawomir

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

    请删除每个  -i 引用编译器提供头文件的目录的选项。  更多详细信息、请参阅 tiarmclang 在线手册的"包含选项"部分。

    谢谢。此致、

    -乔治

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

     问题似乎是由 mcu_plus_sdk_am62x_11_00_00_16/source/drivers/device_manager/rm_pm_hal/rm_pm_hal_src/pm/include 和 mcu_plus_sdk_am62x_11_00_00_16/source/drivers/device_manager/rm_pm_hal_hal/包含 src_pm/hal_types 所引起的。  其中包含 ctype.h 和 errno.h  

    感谢您的提示。

    此致、
    Slawomir