首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 开源软件 >

运用静态库链接程序

2013-07-11 
使用静态库链接程序-( archives -)--start-group archives --end-groupThe archives should be a list of

使用静态库链接程序
-( archives -) --start-group archives --end-group The archives should be a list of archive files. They may be either explicit file names, or -l options. <strong>The specified archives are searched repeatedly until no new undefined references are created.</strong> Normally, an archive is searched only once in the order that it is specified on the command line. If a symbol in that archive is needed to resolve an undefined symbol referred to by an object in an archive that appears later on the command line, the linker would not be able to resolve that reference. By grouping the archives, they all be searched repeatedly until all pos- sible references are resolved. Using this option has a significant performance cost. It is best to use it only when there are unavoidable circular references between two or more archives.

?链接器在处理”-(”和”-)”之间的静态库时,是会重复查找这些静态库的,所以就解决了静态库查找顺序问题。不过,man里面也说明了,这种方式比人工提供了链接顺序的方式效率会低很多。

热点排行