help-make
[Top][All Lists]
Advanced

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

Changes in g++-4.4 to g++-4.6 affecting make


From: Stephen D. Fox
Subject: Changes in g++-4.4 to g++-4.6 affecting make
Date: Wed, 08 Feb 2012 22:26:35 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20120104 Icedove/8.0

Hi,

In makefiles on Ubuntu & Debian machines, previously you could set

CPPFLAGS=$(some paths)
LDFLAGS=$(some libraries)

and

"make main"

would compile by default using something like this command:

g++ $(CPPFLAGS) $(LDFLAGS) main.cpp -o main

Now it gives linking errors because it seems g++-4.6 has changed (maybe
what was previously a bug?). Is it now compulsory for linking flags to
come after the
sources to which they apply?

I've tested with g++-4.4 and make 3.81-8 on ubuntu, and the above works,
but it
doesn't work with g++-4.6.  Is there a different variable I could set
other than LDFLAGS
for a generic makefile like that?

Thanks




reply via email to

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