在使用动态库开发部署时,遇到最多的问题可能就是 undefined symbol 了,导致这个出现这个问题的原因有多种多样,快速找到原因,采用对应的方法解决是本文写作的目的. 可能的原因 依赖库未找到 这是最常见的原因,一般是没有指定查找目录,或者没有安装到系统查找目录里 链接的依赖库不一致 编译的时候使用了高版本,然后不同机器使用时链接的却是低版本,低版本可能缺失某些 api 符号被隐藏 如果动态库编译时被默认隐藏,外部代码使用了某个被隐藏的符号. c++ abi 版本不一致 最典型的例子就是
Error Symptom: when you run $mysql -u root -p command in the linux you get an error message ” mysql: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP” Solution: Step 1: Login as root Step 2: Go to folder path #cd/usr/local/l
ADS1.2编译时,出现找不到一个不存在目录下的目标文件(*.o) 编译一个COPY到硬盘上的一个工程,出现以下的fatal error message: Error: (Fatal)L6002: Could not open file f:\工作备份\20061204\hc_DTMF3\DVS-ATM_data\RelInFLASH\ObjectCode\Startuo.o. “f:\工作备份”这个目录我根本没有,“hc_DTMF3\DVS-ATM_data”这个目录是源代码
MKD 报错: linking...LCD.axf: Error: L6218E: Undefined symbol EnZK (referred from ht128x64.o).LCD.axf: Error: L6218E: Undefined symbol GetFlashCnBuf (referred from ht128x64.o). 解析:Undefined symbol EnZK,翻译过来就是:EnZK 这个符号没有定义,随后的小括号告诉你了,是在ht128x64.o 这个文件里面
Linux下undefined reference to 'pthread_create'问题解决 在试用Linux 线程模块时,试用pthread_create 函数. 编译命令为 gcc main.c -o test时,会出现如下错误 /tmp/ccIvH3bU.o: In function `main': main.c:(.text+0x81): undefined reference to `pthread_create' collect2: error: ld returned 1 e