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.

[参考译文] LP-MSP430FR2476:#20标识符"类"未定义

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1132320/lp-msp430fr2476-20-identifier-class-is-undefined

器件型号:LP-MSP430FR2476
主题中讨论的其他器件:Energia

我尝试将在 CCS 中与 GNC 编译器兼容的"Energia"工程移至 TI 编译器。

我将所有 "Energia"库和文件.c、.h、.cpp 文件移动到本地项目文件夹中、我已成功编译其中的大部分文件、但并非全部。

我看到 Print.h 文件的主要问题,其中我看到 #20 identifier "class" undefined error。 此错误会传播到 Stream.h、Wire.h 以及从 Print 类派生的其他内容。

SPI.h 文件在类 SPISettings 和中也有令人困惑的错误,类 SPIClass  #66预期为“;”

此项目中的其他类已正确编译、到目前为止、我不知道导致这些错误的原因。

Andrew

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

    我解决了大多数问题、在第一个#define 文件之后、在.h Rugh 顶部添加了#indef _cplusplus、并在末尾添加了#endif

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

    它还有助于为您的源文件命名 main.cpp