cannot find -lmyfunction

1.我编译生成了一个动态库文件libmyfunction.so, 放在了/home/mylib中
2.在/etc/ld.so.conf中增加了一行 /home/mylib,然后执行了ldconfig
3.执行 gcc -o test test.c -lmyfunction

结果提示cannot find -lmyfunction,请各位大侠指点
 

作者: hhhbbb   发布时间: 2011-05-26

gcc -o test test.c -L/home/mylib -lmyfunction

作者: justkk   发布时间: 2011-05-26

ldconfig 的那个貌似只在程序运行时管用

作者: justkk   发布时间: 2011-05-26