automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with AC_LINK_IFELSE and library order


From: Ralf Wildenhues
Subject: Re: Problem with AC_LINK_IFELSE and library order
Date: Mon, 24 Oct 2005 11:32:05 +0200
User-agent: Mutt/1.5.11

Hi Francesco,

* Francesco Montorsi wrote on Sat, Oct 22, 2005 at 04:14:11PM CEST:
> 
> I finally found that I was using
> 
> LDFLAGS="$LDFLAGS -ltotest"

*snip*
> instead of
> 
> LIBS="$LIBS -ltotest"
> AC_LINK_IFELSE([
>                 AC_LANG_PROGRAM([#include <wx/url.h>],
>                                 [wxURL u(wxT("http://www.google.it";));])
>                             ],
>                             [WXURL_PRESENCE=1], [WXURL_PRESENCE=0])
> 
> Using LIBS instead of LDFLAGS solved the problem !

It's usually more appropriate to prepend to LIBS (but to append to
LDFLAGS!), in order to facilitate static linking.  Thus, you should be
using
  LIBS="-ltotest $LIBS"

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]