automake
[Top][All Lists]
Advanced

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

Re: c++ link order problems


From: Benoit Sigoure
Subject: Re: c++ link order problems
Date: Tue, 28 Nov 2006 15:46:40 +0100
User-agent: Internet Messaging Program (IMP) H3 (4.0.2)

Quoting Ralf Wildenhues <address@hidden>:

Hello Dan,

* Dan McMahill wrote on Tue, Nov 28, 2006 at 02:56:40PM CET:

foo_SOURCES= src1.cc src4.cc src5.cc
nodist_foo_SOURCES= src2.cc src3.cc

and some extra suffix rules that specify how src2.cc and src3.cc are
created (they are generated at build time).

Now the problem is that the link order needs to be

src1.o src2.o src3.o src4.o src5.o

Try this workaround:

nodist_foo_SOURCES = src1.cc src2.cc src3.cc src4.cc src5.cc
EXTRA_DIST = src1.cc src4.cc src5.cc

You could also factor (by whole names):

src1 = src1.cc
src2 = src2.cc src3.cc
src3 = src4.cc src5.cc
nodist_foo_SOURCES = $(src1) $(src2) $(src3)
EXTRA_DIST = $(src1) $(src3)

Just curious: what's the reason for the ordering constraint?


Thanks for the solution, I ran across this problem last week.
For me, the constraint was imposed by Sony's SDK when linking things for Aibo
which required some stub.o to appear first (and this file was nodist_)
otherwise the robot would segv.

--
SIGOURE Benoit aka Tsuna
  _____
 /EPITA\ Promo 2008, LRDE





reply via email to

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