On Wed, 30 Mar 2005, Oron Peled wrote: > On Wednesday 30 March 2005 01:04, guy keren wrote: > > 1. never ever ever specify link flags before specifying the list of object > > files. don't ask me why - perhaps this is just a habbit. > > Because Unix/Linux linkers are designed to work in a singlepass, > so they must collect all the missing symbols on object files > before searching them in libraries.
you answer the question of "why the order of the '-l' flags is important". it does not answer the question of "why should the '-l' flags come after the object file names". i would imagine that the linker would first handle all object files, and only then handle the '-l' flags (in the order they appeared on the command-line). obviously, this is not what the (gnu) linker does - and i am not sure why. -- guy "For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]