首先./configure --prefix=/usr(指定路径)不是usr路径,需要修改~/.bashrc(/etc/profile或~/.bashrc)添加环境变量
1 export LIBDIR=/usr/local/lib 2 export LD_LIBRARY_PATH=/usr/local/lib 3 export LD_RUN_PATH=/usr/local/lib
然后 make && make install 才可以正确的链接动态库
gcc test.c -lev
首先./configure --prefix=/usr(指定路径)不是usr路径,需要修改~/.bashrc(/etc/profile或~/.bashrc)添加环境变量
1 export LIBDIR=/usr/local/lib 2 export LD_LIBRARY_PATH=/usr/local/lib 3 export LD_RUN_PATH=/usr/local/lib
然后 make && make install 才可以正确的链接动态库
gcc test.c -lev