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.

[参考译文] TMS320F28388D:如何获取 C++.cpp 来编译 Code Composer 上的 TMS320F28388D

Guru**** 2553440 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1068252/tms320f28388d-how-to-get-c-cpp-to-compile-for-tms320f28388d-on-code-composer

部件号:TMS320F28388D
“线程:测试”中讨论的其它部件

我无法获取 C++进行编译。

我有这样的:

#include <string>
#include <string.h>
#include <iostream >


字符串 tst1()

   string strtst ="这是一个测试。";

   回油管;
}

当我尝试构建项目时,我遇到了以下错误:

错误20:未定义标识符“字符串”

它显示在项目属性中

“  C+++03模式下的 C++方言编译程序(--c+03)

如何让 Code Composer 编译和链接 C++程序?

谢谢。

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

    尊敬的先生,女士,  

    您的目的是在代码中使用此行:

    #include <string>

    请对本应用报告进行全面研究:  https://www.ti.com/lit/pdf/spraa85e 

    谢谢,
    克利须那

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

    我的 C++错误--我需要写 std::string 而不是字符串,或者需要将“使用命名空间 std;”放在.cpp 文件的顶部附近。