Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
my_mqtt
使用lwip协议栈和mymqtt软件包编译报错
发布于 2023-03-03 09:51:47 浏览:856
订阅该版
野火stm32f407开发板,rt thread studio开发环境,lwip协议栈使用2.1.2,mymqtt选择latest。编译,报错:`dfs_posix.h: No such file or directory`,屏蔽掉头文件。 编译,仍然报错,报错提示 ``` lwip-2.1.2\src\include/lwip/sockets.h:651:64: error: conflicting types for 'lwip_select' ``` 目前的解决办法是,屏蔽掉当前文件中的lwip_select函数。 编译,提示warn,有重复定义, ``` \rt-thread\components\libc\compilers\common\include/sys/select.h:48:0: warning: "FD_SET" redefined ```
查看更多
1
个回答
默认排序
按发布时间排序
YZRD
2023-03-21
这家伙很懒,什么也没写!
解决办法:修改rt-thread\components\libc\compilers\common\include\sys\select.h文件内容,修改如下 ``` #ifndef __SYS_SELECT_H__ #define __SYS_SELECT_H__ #include
#include
#include
#if 1 #include
#else #ifdef __cplusplus extern "C" { #endif #ifndef FD_SETSIZE #define FD_SETSIZE 32 #endif #ifdef SAL_USING_POSIX #ifdef FD_SETSIZE #undef FD_SETSIZE #endif #define FD_SETSIZE DFS_FD_MAX #endif /* SAL_USING_POSIX */ typedef long fd_mask; #ifndef _SYS_TYPES_FD_SET /* Newlib 2.2.0 or lower version */ #define NBBY 8 /* number of bits in a byte */ #define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */ #ifndef howmany #define howmany(x,y) (((x)+((y)-1))/(y)) #endif /* howmany */ typedef struct _types_fd_set { fd_mask fds_bits[howmany(FD_SETSIZE, NFDBITS)]; } _types_fd_set; #define fd_set _types_fd_set #define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS))) #define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS))) #define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS))) #define FD_ZERO(p) rt_memset((void*)(p), 0, sizeof(*(p))) #endif /* _SYS_TYPES_FD_SET */ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout); #ifdef __cplusplus } #endif #endif ```
撰写答案
登录
注册新账号
关注者
0
被浏览
856
关于作者
YZRD
这家伙很懒,什么也没写!
提问
15
回答
241
被采纳
22
关注TA
发私信
相关问题
1
my mqtt 通讯问题
2
my_mqtt重连失败
3
my mqtt连接问题
4
MY_MQTT 订阅超时
5
mymqtt 不能自动重连
6
mymqtt 报错 连接失败
7
MYMQTT与服务器数据交互,socket send1次发送最大的数据量
8
mymqtt容易自动关闭mqtt连接
9
mymqtt 的例程运行不起来
10
为什么mqtt消息订阅不成功?
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
6
五分钟玩转RT-Thread新社区
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【睿擎工业平台试用】EtherCAT主站控制从站IO
2
【睿擎工业平台试用】硬件平台上手和Modbus功能使用
3
基于GD32F303从0搭建文件系统,挂载2个块设备到文件系统
4
rt thread 文件系统dfs挂载2个块设备
5
RT Thread 块设备注册
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
Bootloader
AT
Hardfault
CAN总线
ART-Pi
FinSH
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
FAL
RTC
rt-smart
I2C_IIC
UART
cubemx
BSP
ESP8266
PWM
ota在线升级
WIZnet_W5500
packages_软件包
flash
freemodbus
GD32
潘多拉开发板_Pandora
ADC
编译报错
keil_MDK
定时器
flashDB
rt_mq_消息队列_msg_queue
ulog
socket
msh
中断
Debug
SFUD
C++_cpp
at_device
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
加缪
11
个答案
1
次被采纳
三世执戟
6
个答案
1
次被采纳
RTT_逍遥
5
个答案
1
次被采纳
用户名由3_15位
5
个答案
1
次被采纳
本月文章贡献
chejia12
9
篇文章
4
次点赞
纯白酱
2
篇文章
4
次点赞
Hlafklio
2
篇文章
1
次点赞
530china
1
篇文章
7
次点赞
rv666
1
篇文章
7
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部