It is designed to resolve circular dependencies between several libraries (specified between -( and -) ).
Quoting Why does the order in which libraries are linked sometimes cause errors in GCC? or man ld http://linux.die.net/man/1/ld
-( archives -) or --start-group archives --end-group
The archives should have a list of archive files. They can be either explicit file names or -l.
The specified archives are re-scanned until new undefined links are created. Typically, an archive searches only once in the order in which it is specified on the command line. If the symbol in this archive is necessary to resolve the undefined symbol, which is indicated by the object in the archive, which appears later on the command line, the linker will not be able to resolve this link. Having grouped the archives, all of them will be searched until all possible links are resolved.
Using this option has significant performance. It is better to use it only when there are inevitable circular links between two or more archives.
This way, libraries within a group can look for a few new characters, and you don't need ugly constructs like -llib1 -llib2 -llib1
PS archive means basically a static library ( *.a )
osgx Apr 13 '11 at 15:39 2011-04-13 15:39
source share