TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

compilation issue

Open skyformat99 opened this issue 3 years ago • 3 comments

20220907 10:50 1)git clone lastest code 2) ./build.sh

error message: libs/transport/src/transCli.c:1141:3:错误:‘destroyUserdata’是静态的,但却在非静态的内联函数‘destroyCmsg’中被使用 [-Werror] destroyUserdata(&pMsg->msg); ^ TDengine/source/libs/transport/src/transCli.c:1140:3:错误:‘transDestroyConnCtx’是静态的,但却在非静态的内联函数‘destroyCms’中被使用 [-Werror] transDestroyConnCtx(pMsg->ctx);

skyformat99 avatar Sep 07 '22 02:09 skyformat99

可以根据 readme 试试:https://github.com/taosdata/TDengine

yu285 avatar Sep 08 '22 06:09 yu285

严格按照readme执行的,仍然不能编译啊 提示这么清晰了,看一下代码不香吗?

error message: libs/transport/src/transCli.c:1141:3:错误:‘destroyUserdata’是静态的,但却在非静态的内联函数‘destroyCmsg’中被使用 [-Werror] destroyUserdata(&pMsg->msg); ^ TDengine/source/libs/transport/src/transCli.c:1140:3:错误:‘transDestroyConnCtx’是静态的,但却在非静态的内联函数‘destroyCms’中被使用 [-Werror] transDestroyConnCtx(pMsg->ctx);

skyformat99 avatar Sep 13 '22 02:09 skyformat99

没办法、自己动手解决了。 修改 1135行,前面添加 static 即可。 static FORCE_INLINE void destroyCmsg(void* arg) {

其实,文件上面 152行是对的;但是 1135行却写错了,少了 static关键字

这么明显的错误,这么长时间没有啥子反馈,搞不懂

skyformat99 avatar Sep 15 '22 02:09 skyformat99