游戏人生

不积跬步,无以至千里;不积小流,无以成江海。

导航

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

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

posted on 2015-05-18 18:48  crazii  阅读(206)  评论(0编辑  收藏  举报