This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

When linking, why -L's *must* come before -l's??? Why -l's can comebefore function calls?!!


I learned the hard way that -L mypath stuff must come _before_ -l
mylibrary stuff when linking.
This means -L's MUST go on name_LDADD line of Makefile.am and not on
name_LDFLAGS
line since name_LDFLAGS stuff will come /after/ name_LDADD stuff during
linking.

Why is gcc compiler smart enough to let you put -l's BEFORE object files
and main()
but not smart enough to let you put -L's *after* -l's on command line when
linking??
Chris







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]