|
From: | cs |
Subject: | When linking, why -L's *must* come before -l's??? Why -l's can come before function calls?!! |
Date: | Fri, 2 May 2003 11:29:30 -0700 (MST) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |