求助:undefined reference to `pcre_compile'
Ubuntu 12.04 LTS
通过apt-get install libpcre3 libpcre3-dev安装pcre,安装后,pcre.h在/usr/include/pcre.h
程序中,#include <pcre.h>
gcc -Wall -I/usr/include -I/usr/local/include -L/lib -L/usr/lib -L/usr/local/lib -lpcre 5.c,有如下提示:
5.c.text+0x54): undefined reference to `pcre_compile'
5.c.text+0x7d): undefined reference to `pcre_study'
5.c.text+0xf2): undefined reference to `pcre_exec'
5.c.text+0x10: undefined reference to `pcre_free_study'
5.c.text+0x10e): undefined reference to `pcre_free'
怎么解决?
------解决方案--------------------
检查libpcre.so