【发布时间】:2013-11-08 06:17:54
【问题描述】:
我正在尝试在 IAR 工作台 v6.3.3 上为 Windows 7 x64 上的 AVR UC3C0512C 编译 CppUtest 作为库,但是当我编译它时,它说 std 命名空间未定义。
这是我得到第一个错误的代码片段,文件是 SimpleString.h:
#if CPPUTEST_USE_STD_CPP_LIB
#include <string>
#include <stdint.h>
SimpleString StringFrom(const std::string& other);
最后一行包含 std::string,这给我带来了 190 个与此相关的错误。消息是:
Error[Pe276]: name followed by "::" must be a class or namespace name
C:\COM\SRC\cpputest35\include\CppUTest\SimpleString.h 143
我尝试使用下面的行,但没有帮助:
using namespace std;
在库配置下,我选择普通 DLIB,我也尝试使用完整 DLIB,但 IAR 看不到 std 库
有什么想法吗?
【问题讨论】:
-
AVR 由完全支持 ISO C++ 而不是 EC++ 的 GCC 支持。 EC++ 在很大程度上已经过时了。
-
我们正在将项目迁移到 GCC,但这不是一件容易的事。
标签: c++ embedded shared-libraries iar