c语言4L是什么意思,gcc中-lfoo表示什么意思这个中gccfoo.c-L&#4? 爱问知识人

下面是man gcc里面的介绍。

比较靠后,我的结果大概是8113到8140行。

简单的讲就是foo这个库的链接查找方法。详细内容,,请看下面的英文。。。。。或者自己man gcc 查看8113到8140行的内容。

-llibrary

-l library

Search the library named library when linking。 (The second

alternative with the library as a separate argument is only for

POSIX compliance and is not recommended。

)

It makes a difference where in the command you write this option;

the linker searches and processes libraries and object files in the

order they are specified。

Thus, foo。o -lz bar。o searches library z

after file foo。o but before bar。o。 If bar。o refers to functions in

z, those functions may not be loaded。

The linker searches a standard list of directories for the library,

which is actually a file named liblibrary。

a。 The linker then uses

this file as if it had been specified precisely by name。

The directories searched include several standard system

directories plus any that you specify with -L。

Normally the files found this way are library files---archive files

whose members are object files。

The linker handles an archive file

by scanning through it for members which define symbols that have

so far been referenced but not defined。

But if the file that is

found is an ordinary object file, it is linked in the usual

fashion。

The only difference between using an -l option and

specifying a file name is that -l surrounds library with lib and 。

a

and searches several directories。

全部

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值