|
From: | Warren Young |
Subject: | Re: Generated Makefile fails to build |
Date: | Fri, 19 Sep 2014 17:46:04 -0600 |
User-agent: | Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 9/19/2014 17:16, Bob Friesenhahn wrote:
On Sat, 20 Sep 2014, Robert Parker wrote:AM_LDFLAGS = -lmhashA library is not a linker flag so it does not belong in LDFLAGS. Look into using a 'LIBADD' type option instead.This problem seems to be a 'feature' of gcc because the same error happens when compiling by manual commands. What must I do please?LIBS are not flags. Take care to specify libraries where libraries are supposed to go.
Just stepping back a bit, some linkers are more tolerant than others about the order of flags and such. Libraries that land in standard locations like /usr/lib also obscure this issue, by rendering irrelevant an improperly-placed or -constructed -L flag.
Because of this, you will find a fair number of bad Makefile.am examples out in the wild. You don't find out that you've been emulating one of these bad examples until you try your package on a system with a stricter linker or one that places libraries you need in odd places.
[Prev in Thread] | Current Thread | [Next in Thread] |