![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编译运行错误汇总
记录代码在编译及运行期间出现的错误及解决方案
逆天小神健
人间不值得
展开
-
error: ‘SOL_TCP’ or ‘TCP_KEEPIDLE’ was not declared in this scope
解决办法#include <netinet/tcp.h>原创 2021-03-31 15:47:00 · 2676 阅读 · 0 评论 -
openssl版本冲突导致的pthread_rwlock_wrlock.c: No such file or directory
报错信息原因openssl库版本冲突导致:程序自身使用了openssl 1.0.2r版本,之后使用第三方提供的库,该库内部包含了openssl的1.1.0版本(这一点第三方服务提供商并未主动告知),导致可以通过编译,一运行就会出错。现象为了定位问题原因,逐步排查,最后发现只要makefile中使用了该第三方库(如:LIBS += -lxxx)且代码中未调用该库任何接口,编译好的程序运行就会崩溃。解决方法将程序本身使用的openssl库升级到1.1.0f版本:https://www.openss原创 2020-06-12 08:56:20 · 1010 阅读 · 0 评论 -
使用zlog库导致的undefined reference to pthread_rwlock_wrlock
报错信息zlog.c:(.text+0xb): undefined reference to `pthread_getspecific'../../xstudiopro-utility/lib/Linux_x86_64/libzlog.a(zlog.o): In function `zlog_init_inner':zlog.c:(.text+0xbd): undefined reference to `pthread_key_create'../../xstudiopro-utility/lib/原创 2020-06-12 08:35:01 · 1714 阅读 · 0 评论 -
Makefile:69: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
Makefile:69: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.例如:(想必你肯定看不出哪里出问题了)CXXFLAGS+= -I/usr/local/include -I/usr/local/$(ARCH)/include \ -I/usr/local/$(ARCH)/open...原创 2020-04-22 20:25:16 · 792 阅读 · 0 评论