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/MSP430-GCC-opensource:C++17

Guru**** 2589280 points


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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/865082/ccs-msp430-gcc-opensource-c-17

器件型号:MSP430-GCC-opensource

工具/软件:Code Composer Studio

您好!

在 CCS 中使用 GNU C++ 8.3.0.16 (Mitto Systems Limited)、我的代码使用 gcc 选项-std=c++14进行编译、但以下情况会变得奇怪:

-std=GNU++14

我得到第一个错误:
在包含在 c:\programs\ti\ccs920\ccs\tools\compiler\msp430-gcc-8.3.0.16_win32\msp430-elf\include\math.h:6中的文件中、
                从 c:\programs\ti\ccs920\ccs\tools\compiler\msp430-gcc-8.3.0.16_win32\msp430-elf\include\c++\8.3.0\cmh:45、

   \ti\ccs920\ccs\tools\compiler\msp430-gcc-8.3.0.16_win32\msp430-elf\include\sys\select.h:73:12:错误:'int select (int、_types_fD_set*、_types_fd_set*、timeval*)'重新声明为不同类型的符号

   int select __P ((int __n、fd_set *__readfds、fd_set *__writefds、

()             ^~~

(我不知道 math.h 如何包含 sys/select.h)


-std=C++17
-std=GNU++17
 我得到第一个错误:

  C:\programs\ti\ccs920\ccs\tools\compiler\msp430-gcc-8.3.0.16_win32\msp430-elf\include\c++\8.3.0\iosfwd:95:24:错误:'std::allocator'不是模板
        Typename _Alloc =分配器 <_CharT>>
                           ^~~~~~~~~μ A

有什么想法?!

谢谢你。

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

    您好!

    请为这些错误提供一个可重现示例(MSP430-elf-g++调用和源代码)。

    谢谢、

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

    用户157098、您好!

    几天以来,我们都没有听到您的声音,因此我假设您能够解决您的问题。
    如果情况并非如此,请单击“这无法解决我的问题”按钮,并使用更多信息回复此主题。
    如果此主题锁定、请单击"提出相关问题"按钮、然后在新主题中描述您的问题的当前状态以及您可能需要帮助我们帮助解决您的问题的任何其他详细信息。