Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
error
RT-Thread Studio
开启C++ 11 功能后,RT-Thread Studio编译报错,求助
发布于 2022-10-18 13:52:21 浏览:641
订阅该版
大家好,我正在尝试,在RT-Thread Studio 上使用rt-thread的C++ 11 功能,新建了一个简单工程就报错,大概流程如下:     由于问题比较多,我这里就贴出来几个,我不知道是我哪个地方配置不对,还是RT-Thread包里面新的代码就有问题,感谢大家的回复,先谢谢了 ```c In file included from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable:7:0, from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable.cpp:11: C:\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/pthread.h:27:43: error: could not convert '0' from 'int' to 'rt_mutex' #define PTHREAD_MUTEX_INITIALIZER {-1, 0} ^ ../rt-thread/components/cplusplus/cpp11/gcc/mutex:28:38: note: in expansion of macro 'PTHREAD_MUTEX_INITIALIZER' __native_type _m_mutex = PTHREAD_MUTEX_INITIALIZER; ^ In file included from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable:16:0, from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable.cpp:11: ../rt-thread/components/cplusplus/cpp11/gcc/mutex:39:23: error: explicitly defaulted function 'constexpr std::mutex::mutex()' cannot be declared as constexpr because the implicit declaration is not constexpr: constexpr mutex() = default; ^ ../rt-thread/components/cplusplus/cpp11/gcc/mutex:36:11: error: use of deleted function 'constexpr std::__mutex_base::__mutex_base()' class mutex : private __mutex_base ^ ../rt-thread/components/cplusplus/cpp11/gcc/mutex:30:23: note: 'constexpr std::__mutex_base::__mutex_base() noexcept' is implicitly deleted because its exception-specification does not match the implicit exception-specification 'noexcept (false)' constexpr __mutex_base() noexcept = default; ^ In file included from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable:7:0, from ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable.cpp:11: C:\RT-ThreadStudio\workspace\test3\rt-thread\components\libc\pthreads/pthread.h:25:43: error: could not convert '0' from 'int' to 'rt_semaphore' #define PTHREAD_COND_INITIALIZER {-1, 0} ^ ../rt-thread/components/cplusplus/cpp11/gcc/condition_variable:113:35: note: in expansion of macro 'PTHREAD_COND_INITIALIZER' rt_cpp_cond_var _m_cond = PTHREAD_COND_INITIALIZER; ```
查看更多
0
个回答
默认排序
按发布时间排序
暂无答案,快来添加答案吧
撰写答案
登录
注册新账号
关注者
1
被浏览
641
关于作者
ORU6X1
这家伙很懒,什么也没写!
提问
2
回答
0
被采纳
0
关注TA
发私信
相关问题
1
rt_thread studio 啥时候能用呢
2
RT_Thread使用反馈帖子
3
RTT studio 下的 AT指令问题。
4
什么时候RTT Sdudio支持Ubuntu,Deepin和UOS操作系统
5
rt thread Studio 关于J-LINK下载问题
6
RT-Thread studio 调试设置问题
7
RTT-Studio 如何设置调试配置参数?
8
rt_thread studio 软件包配置
9
RT-Studio目前只能开发STM32的项目吗?
10
rtt studio 生成hex名字修改
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【CFP】2025 RT-Thread全球技术大会演讲征集开始啦!
2
在 RT-Thread Studio 环境中为 ART-Pi 2 移植 CherryUSB(以 usb_device 为例)
3
嵌入式ARM RISCV toolchain工具 梳理arm-none-eabi-gcc
4
使用官方BOOT升级,看这一篇就够了?(以STM32F407VGT6为例)
5
可以使用MQTT连接AI大模型吗
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
cubemx
ESP8266
WIZnet_W5500
UART
ota在线升级
BSP
PWM
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
ADC
GD32
定时器
flashDB
编译报错
socket
keil_MDK
中断
rt_mq_消息队列_msg_queue
Debug
SFUD
msh
ulog
C++_cpp
at_device
本月问答贡献
聚散无由
9
个答案
6
次被采纳
RTT_逍遥
7
个答案
2
次被采纳
a1012112796
5
个答案
2
次被采纳
加缪
2
个答案
2
次被采纳
踩姑娘的小蘑菇
6
个答案
1
次被采纳
本月文章贡献
wake_mirco
2
篇文章
7
次点赞
mushroom
1
篇文章
9
次点赞
张世争
1
篇文章
7
次点赞
RTT_逍遥
1
篇文章
5
次点赞
Jack_____
1
篇文章
5
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部