Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread English
RT-Thread GCC Compiler Error
发布于 2014-07-25 09:21:26 浏览:9032
订阅该版
Hi All, I'm trying to compile RT-Tread with Eclip-se + GCC 4.8 and the compiller is giving me an error inside the include file "rtservice.h" at macro define ```#define rt_list_entry(node, type, member) ((type *)((char *)(node) - (unsigned long)(&((type *)0)->member)))``` Error: dereferencing pointer to incomplete type Can anyone help me with this problem? Best Regards.
查看更多
8
个回答
默认排序
按发布时间排序
bernard
2014-07-25
这家伙很懒,什么也没写!
Which bsp did you use? And do you use scons command line to compile it? If you use eclipse, it's better to use scons to replace make & Makefile. Otherwise, you should properly prepare your development environment.
WGR7
2014-07-25
这家伙很懒,什么也没写!
I'm using LPC176x bsp and using eclipse with your default make build tool, but this error is not a build error and a compile error. The compiler don't acepts this macro because it found a sintax error. Did you compile the RT-Thread 1.2.0 with GCC?
WGR7
2014-07-30
这家伙很懒,什么也没写!
The error is that GCC don't accepts a null pointer like this ((type *)0) I need to include stdio.h and change to this ((type *)NULL) Tnks
bernard
2014-07-30
这家伙很懒,什么也没写!
Could you please provide version information of GCC? For example, the out put of `arm-none-eabi-gcc -v`
grissiom
2014-07-30
这家伙很懒,什么也没写!
>The error is that GCC don't accepts a null pointer like this >((type *)0) >I need to include stdio.h and change to this >((type *)NULL) > >Tnks --- Although we don't use the __builtin_offsetof in GCC but I think ((type*)0) should not be a problem. I highly suspect that you didn't get the include path right and included a wrong header.
WGR7
2014-07-30
这家伙很懒,什么也没写!
Hi, Thanks for the support. I already has a code that a conversion of a null pointer like this one generated an error. The pointer was like this (void *)0 THis type of conversion was not allowed. Bellow follows the result of arm-none-eabi-gcc -v command ``` C:Program Files (x86)GNU Tools ARM Embedded4.8 2014q2in>arm-none-eabi-gcc - v Using built-in specs. COLLECT_GCC=arm-none-eabi-gcc COLLECT_LTO_WRAPPER=c:/program files (x86)/gnu tools arm embedded/4.8 2014 q2/bin/../lib/gcc/arm-none-eabi/4.8.4/lto-wrapper.exe Target: arm-none-eabi Configured with: /home/build/work/GCC-4-8-build/src/gcc/configure --build=i686-l inux-gnu --host=i686-w64-mingw32 --target=arm-none-eabi --prefix=/home/build/wor k/GCC-4-8-build/install-mingw --libexecdir=/home/build/work/GCC-4-8-build/instal l-mingw/lib --infodir=/home/build/work/GCC-4-8-build/install-mingw/share/doc/gcc -arm-none-eabi/info --mandir=/home/build/work/GCC-4-8-build/install-mingw/share/ doc/gcc-arm-none-eabi/man --htmldir=/home/build/work/GCC-4-8-build/install-mingw /share/doc/gcc-arm-none-eabi/html --pdfdir=/home/build/work/GCC-4-8-build/instal l-mingw/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --disable-decim al-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libqu admath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared - -disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-headers=yes -- with-newlib --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/home/build /work/GCC-4-8-build/install-mingw/arm-none-eabi --with-libiconv-prefix=/home/bui ld/work/GCC-4-8-build/build-mingw/host-libs/usr --with-gmp=/home/build/work/GCC- 4-8-build/build-mingw/host-libs/usr --with-mpfr=/home/build/work/GCC-4-8-build/b uild-mingw/host-libs/usr --with-mpc=/home/build/work/GCC-4-8-build/build-mingw/h ost-libs/usr --with-isl=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-cloog=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-li belf=/home/build/work/GCC-4-8-build/build-mingw/host-libs/usr --with-host-libstd cxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m ,armv7-r Thread model: single gcc version 4.8.4 20140526 (release) [ARM/embedded-4_8-branch revision 211358] ( GNU Tools for ARM Embedded Processors) C:Program Files (x86)GNU Tools ARM Embedded4.8 2014q2in> ```
grissiom
2014-07-31
这家伙很懒,什么也没写!
>Hi, > >Thanks for the support. I already has a code that a conversion of a null pointer like this one generated an error. The pointer was like this > >(void *)0 --- Noop. You can type cast any thing to any type in C. So this should be legal.
撰写答案
登录
注册新账号
关注者
0
被浏览
9k
关于作者
WGR7
这家伙很懒,什么也没写!
提问
10
回答
9
被采纳
0
关注TA
发私信
相关问题
1
Welcome to RT-Thread RTOS English discussion
2
good!
3
The speed of external SRAM of STM32
4
RT-Thread on ST Forum
5
Splay Tree
6
More RTGUI screenshot
7
STM32 pimer2
8
mini2440 support
9
Howto Run RT-Thread 0.4.0 on QEMU/mini2440
10
RT-Gui : how can use it?
推荐文章
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 2024开发者大会议程正式发布!
2
【24嵌入式设计大赛】基于RT-Thread星火一号的智慧家居系统
3
RT-Thread EtherKit开源以太网硬件正式发布
4
如何在master上的BSP中添加配置yml文件
5
使用百度AI助手辅助编写一个rt-thread下的ONVIF设备发现功能的功能代码
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
ESP8266
I2C_IIC
WIZnet_W5500
UART
ota在线升级
PWM
cubemx
freemodbus
flash
packages_软件包
BSP
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
中断
Debug
编译报错
msh
SFUD
keil_MDK
rt_mq_消息队列_msg_queue
MicroPython
ulog
C++_cpp
本月问答贡献
踩姑娘的小蘑菇
7
个答案
3
次被采纳
a1012112796
19
个答案
2
次被采纳
张世争
9
个答案
2
次被采纳
rv666
6
个答案
2
次被采纳
用户名由3_15位
13
个答案
1
次被采纳
本月文章贡献
程序员阿伟
9
篇文章
2
次点赞
hhart
3
篇文章
4
次点赞
大龄码农
1
篇文章
5
次点赞
RTT_逍遥
1
篇文章
4
次点赞
ThinkCode
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部