码迷,mamicode.com
首页 > 其他好文 > 详细

[百度空间] ld: add library file reference by path & file name

时间:2015-05-18 20:25:43      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:

By default, -l option will search libraries with lib* prefix in speficied search paths.

i.e.

1
ld -o a.out -lA cppmain.o

will search libA.so/libA.a in all library search paths.

 

but it is possbile to set library by using a path & any filename(without lib prefix): use -l:"PATH_TO_LIBFILE"

1
ld -o a.out -l:~/dynlib.foo

[百度空间] ld: add library file reference by path & file name

标签:

原文地址:http://www.cnblogs.com/crazii/p/4512792.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!