用编程改变大众。。。
分类: C/C++
2015-07-18 17:39:01
1、编译时出现:
../lib/hisi/libhdmi.a(mpi_hdmi.o): In function `HI_MPI_HDMI_GetSinkCapability':
mpi_hdmi.c:(.text+0x19dc): undefined reference to `pthread_mutex_lock'
mpi_hdmi.c:(.text+0x1a00): undefined reference to `pthread_mutex_unlock'
PS:可能是库没有找到,或者是库链接的先后顺序不正确
2、用g++编译时要链接c库
undefined reference to `XXXXXX'
PS:包含C库的头文件用extern ‘C’ {xxx.h}