linux的makefile-I(⼤写i)-L(⼤写l)-l(⼩写l)
gcc-ohellohello.c-I/home/hello/include-L/home/hello/lib-lworld
上⾯这句表⽰在编译hello.c时:
-I/home/hello/include
表⽰将/home/hello/include⽬录作为第⼀个寻找头⽂件的⽬录,寻找的顺序
是:/home/hello/include–>/usr/include–>/usr/local/include
-L/home/hello/lib
表⽰将/home/hello/lib⽬录作为第⼀个寻找库⽂件的⽬录,寻找的顺序是:/home/hello/lib–>/lib–
>/usr/lib–>/usr/local/lib
-lworld
表⽰在上⾯的lib的路径中寻找动态库⽂件(如果gcc编译选项中加⼊了“-static”表⽰寻找
libworld.a静态库⽂件)
本文发布于:2022-12-07 17:22:45,感谢您对本站的认可!
本文链接:http://www.wtabcd.cn/fanwen/fan/88/60859.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |