Linux编译报错:“......undefined reference to symbol ‘[email protected]@GLIBC_2.4.....”


1. 问题


报错:
Linux编译报错:“......undefined reference to symbol ‘[email protected]@GLIBC_2.4.....”


2. 真因


因为调用线程相关(pthread)函数。


3. 解决方案


修改makefile文件,在arm-linux-gnueabihf-gcc后面加上-lpthread

再编译,OK.