[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Statically compiled binaries not re-linked as expected.
From: |
Seb James |
Subject: |
Re: Statically compiled binaries not re-linked as expected. |
Date: |
Tue, 12 May 2009 12:21:50 +0100 |
On Mon, 2009-05-11 at 23:42 +0200, Ralf Wildenhues wrote:
> Hi Seb,
>
> please keep the mailing list in Cc:, thanks.
>
> * Seb James wrote on Mon, May 11, 2009 at 10:49:34PM CEST:
> > > > However, if I reconfigure like this:
> > > >
> > > > ./configure --enable-static --disable-shared
> > > >
> > > > Then make clean && make will generate a mainprog with libproject
> > > > statically linked into the executable. So far so good.
> > > >
> > > > However, if I change libcodefiles.cpp and re-call make, libproject is
> > > > recompiled, but the executable mainprog is not re-linked.
>
> > The project is called "wmlcbr" with the root directory "wmlcbr"
> > containing just the "main()" function of each program and most of the
> > code in wmlcbr/wmlcbr/
>
> > wmlcbrfilt_LDADD = -L./wmlcbr -lwmlcbr -lcups -lwmllicence -lwmlppfilt
> > -lwmlppcommon -lxml++-2.6 -lwmlcups -lcups -luuid -lmysqlpp -lmysqlclient
> > -L/usr/lib/mysql
>
> Please drop the -L./wmlcbr and change all in-build-tree library
> references to be like wmlcbr/libwmlcbr.la:
>
> wmlcbrfilt_LDADD = wmlcbr/libwmlcbr.la -lcups -lwmllicence -lwmlppfilt
> -lwmlppcommon -lxml++-2.6 -lwmlcups -lcups -luuid -lmysqlpp -lmysqlclient
> -L/usr/lib/mysql
>
> Similar for all other in-tree libraries that the line may have, and all
> other programs. BTW, omit the ./ before wmlcbr, in-tree file names
> can be reused in wmlcbrfilt_DEPENDENCIES by automake.
>
> Cheers,
> Ralf
Hi Ralf,
Many thanks for pointing out the errors in my Makefile.am. After making
the changes you suggested above, all my static binaries are now
correctly re-built when changes are made in the wmlcbr/ subdirectory
containing the code for libwmlcbr.
best,
Seb James