繁体   English   中英

mbed-os编译- <new> arm-gcc中缺少库

[英]mbed-os compile - <new> library missing in arm-gcc

当我并排安装mbed-os和我自己的库时,出现以下错误消息

文件夹布局:

.
|_mbed-os
|_library

/mbed-os/platform/Callback.h:21:15: fatal error: new: No such file or directory compilation terminated.

它是从以下行开始的:

#include <new>

包括来自此文件:

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @file timer_platform.h
 */
#include "mbed.h"
#include "timer_interface.h"

/**
 * definition of the Timer struct. Platform specific
 */
struct Timer Timer;

#ifdef __cplusplus
}
#endif

我运行mbed compile时发生错误

我正在1.0.0版本中运行带有mbed-cli的Windows 10 64bit。 编译器是gcc-arm-none-eabi 5.4

这个图书馆应该在哪里? 我如何跟踪错误? 我对C ++相当陌生,但是对C有一定的经验

认为这是因为您是从.c文件引用mbed.h标头(或Callback.h )。 重命名为C ++。

如果需要文件为C,则将其包装在extern "C" {}块中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM