gcc编译minigui新程序报错

!g
gcc *.c  -ljpeg -lpng  -lminigui -lpthread
/usr/local/lib/libminigui.so: undefined reference to `dlsym'
/usr/local/lib/libminigui.so: undefined reference to `dlerror'
/usr/local/lib/libminigui.so: undefined reference to `dlopen'
/usr/local/lib/libminigui.so: undefined reference to `dlclose'
collect2: ld 返回 1

 

man  dlsym发现此函数在动态库/usr/lib/libdl.so里面

于是果断链接动态库试试看,却成功了

gcc *.c  -ljpeg -lpng  -lminigui -lpthread -ldl

 

posted @ 2014-04-12 18:00  夕相待  阅读(747)  评论(0编辑  收藏  举报