Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
error
RT-Thread Studio
开启C++ 11 功能后,RT-Thread Studio编译报错,求助
发布于 2022-10-18 13:52:21 浏览:603
订阅该版
大家好,我正在尝试,在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
被浏览
603
关于作者
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
RT-Thread动态模块
2
RT-Thread项目助手v0.3 | Ubuntu与MacOS平台的RT-Thread Env
3
【FRA156测评DM-MCX】- 环境配置篇
4
【基于HPM6750+RW007的网页服务器】---SD卡文件系统
5
有关RT_thread studio使用WDT的一点经验
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
rt-smart
RTC
FAL
I2C_IIC
ESP8266
UART
cubemx
WIZnet_W5500
ota在线升级
PWM
BSP
flash
freemodbus
packages_软件包
潘多拉开发板_Pandora
GD32
定时器
ADC
flashDB
编译报错
socket
中断
rt_mq_消息队列_msg_queue
Debug
keil_MDK
SFUD
msh
ulog
C++_cpp
MicroPython
本月问答贡献
lchnu
3
个答案
2
次被采纳
张世争
1
个答案
2
次被采纳
a1012112796
9
个答案
1
次被采纳
三世执戟
8
个答案
1
次被采纳
聚散无由
5
个答案
1
次被采纳
本月文章贡献
jinchanchan
9
篇文章
13
次点赞
ssdd45555
3
篇文章
2
次点赞
聚散无由
1
篇文章
4
次点赞
rvcore
1
篇文章
1
次点赞
lvdongchina
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部