On 9/19/2014 17:16, Bob Friesenhahn wrote:
On Sat, 20 Sep 2014, Robert Parker wrote:

AM_LDFLAGS = -lmhash

A 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.

Reply via email to