delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4BBBC94A.3020505@gmail.com> |
Date: | Wed, 07 Apr 2010 00:52:42 +0100 |
From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: GNU make builtin rules produce linker error due to command line arguments order |
References: | <4BBBC2AE DOT 4080606 AT vub DOT ac DOT be> |
In-Reply-To: | <4BBBC2AE.4080606@vub.ac.be> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On 07/04/2010 00:24, Robrecht Dewaele wrote: > $ LDFLAGS=-lpopt make options Only put flags in LDFLAGS. Put libs in LDLIBS. The default rule is > %: %.c > # commands to execute (built-in): > $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@ and LINK.c embeds LDFLAGS. On ELF platforms where command-line order of linker inputs doesn't matter so much, it'll often work to put -l options in LDFLAGS, but it's not portable to PE platforms like Windows/Cygwin where the libraries have to come last on the command-line. cheers, DaveK -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |