[英]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.