automake
[Top][All Lists]
Advanced

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

Re: Source files in different directory? Now: linker input file unused b


From: Paul Elliott
Subject: Re: Source files in different directory? Now: linker input file unused because linking not done
Date: Wed, 20 Jul 2011 13:00:57 -0500
User-agent: KMail/1.13.6 (Linux/2.6.38-10-generic; KDE/4.6.2; i686; ; )

I have found out that the error messages 
"linker input file unused because linking not done"
is only a warning! Library and programs linking to it work correctly!

I need to figure out what this message means, why having my source in a 
seperate directory from the directory having the autotools files caused it,
and how to supress it. Can anyone help?


On Wednesday, July 20, 2011 01:34:11 AM Paul Elliott wrote:
> On Saturday, June 25, 2011 03:47:56 PM you wrote:
> > Hi Paul,
> > 
> > you may try:
> > 
> > DIR = $(top_srcdir)/../other/src
> > 
> > to refer to that directory.
> 
> I have moved all my .c and .h source to a defferent directory from the one
> wherein I am building. I now get a lot of error messages of the form:
> "linker input file unused because linking not done"
> What am I doing wrong? Do I need some kind of flag to tell gcc where to
> look? Thank You.
> 
> 
> I now have the source and the include files in a different read only
> directroy: I am building a library:
> 
> 
> --------from my Makefile.am-------------
> 
> > astrosrc = $(astrodienst)/src
> > lib_LTLIBRARIES = libswe.la
> > 
> > 
> > libswe_la_SOURCES = \
> > 
> >         $(astrosrc)/swecl.c    \
> >         $(astrosrc)/swedate.c    \
> >         $(astrosrc)/swedate.h    \
> >         $(astrosrc)/swedll.h    \
> >         $(astrosrc)/swehel.c    \
> >         $(astrosrc)/swehouse.c    \
> >         $(astrosrc)/swehouse.h    \
> >         $(astrosrc)/swejpl.c    \
> >         $(astrosrc)/swejpl.h    \
> >         $(astrosrc)/swemmoon.c    \
> >         $(astrosrc)/swemplan.c    \
> >         $(astrosrc)/swenut2000a.h    \
> >         $(astrosrc)/sweodef.h    \
> >         $(astrosrc)/swepcalc.c    \
> >         $(astrosrc)/swepcalc.h    \
> >         $(astrosrc)/swepdate.c    \
> >         $(astrosrc)/sweph.c    \
> >         $(astrosrc)/sweph.h    \
> >         $(astrosrc)/swephexp.h    \
> >         $(astrosrc)/swephlib.c    \
> >         $(astrosrc)/swephlib.h
> > 
> > libswe_la_CFLAGS = \
> > 
> >         -lm
> > 
> > libswe_la_LDFLAGS =
> > 
> > libswe_la_LIBADD =
> > include_HEADERS = \
> > 
> >         $(astrosrc)/sweodef.h\
> >         $(astrosrc)/swephexp.h
> > 
> > pkgconfigdir = $(libdir)/pkgconfig
> > pkgconfig_DATA = libswe-1.77.00.pc
> > 
> > EXTRA_DIST = \
> > 
> >         libswe-1.77.00.pc.in\
> >         $(astrosrc)/swemptab.c
> > 
> > INCLUDES = \
> > 
> >         $(astrodienst)/src
> > 
> > bin_PROGRAMS = \
> > 
> >         swetest\
> >         swemini
> > 
> > swemini_SOURCES = \
> > 
> >         $(astrosrc)/swemini.c
> > 
> > swemini_LDADD = \
> > 
> >         libswe.la
> > 
> > swetest_SOURCES = \
> > 
> >         $(astrosrc)/swetest.c
> > 
> > swetest_LDADD = \
> > 
> >         libswe.la
> > 
> > include_HEADERS = \
> > 
> >         $(astrosrc)/sweodef.h\
> >         $(astrosrc)/swephexp.h
> > 
> > pkgconfigdir = $(libdir)/pkgconfig
> > pkgconfig_DATA = libswe-1.77.00.pc
> > 
> > EXTRA_DIST = \
> > 
> >         libswe-1.77.00.pc.in\
> >         $(astrosrc)/swemptab.c
> > 
> > INCLUDES = \
> > 
> >         $(astrodienst)/src
> > 
> > bin_PROGRAMS = \
> > 
> >         swetest\
> >         swemini
> > 
> > swemini_SOURCES = \
> > 
> >         $(astrosrc)/swemini.c
> > 
> > swemini_LDADD = \
> > 
> >         libswe.la
> > 
> > swetest_SOURCES = \
> > 
> >         $(astrosrc)/swetest.c
> > 
> > swetest_LDADD = \
> > 
> >         libswe.la
> 
> After making this change I get a lot of messages of the form:
> linker input file unused because linking not done
> 
> --sample error message.
> 
> >   CC     libswe_la-swecl.lo
> > 
> > gcc: ../astrodienst/src: linker input file unused because linking not
> > done
> > 
> >   CC     libswe_la-swedate.lo
> > 
> > gcc: ../astrodienst/src: linker input file unused because linking not
> > done
> > 
> >   CC     libswe_la-swehel.lo
> > 
> > gcc: ../astrodienst/src: linker input file unused because linking not
> > done
> 
> -------------origianl message-------------------
> 
> > Cheers
> > Marcelo
> > 
> > 2011/6/25 Paul Elliott <address@hidden>
> > 
> > > I need to keep my source files (i.e. .c and .h ) in a different
> > > directory tree
> > > from the one that contains the autotools control files and the build
> > > directory.
> > > 
> > > That is, when building X.o or X.lo I need to tell it to always find the
> > > source
> > > file as
> > > ../other/src/X.c not ./X.c. I do not control the contents of the
> > > ../other/src/
> > > directory
> > > so I can not create any Autotools control files there or any object
> > > files there.
> > > To me, that directory is read only.
> > > 
> > > Is there a way to do this conveniently in automake? An implicit rule
> > > perhaps?
> > > 
> > > Thank You.
> > > 
> > > 
> > > --
> > > Paul Elliott                               1(512)837-1096
> > > address@hidden               PMB 181, 11900 Metric Blvd
> > > Suite J
> > > http://www.free.blackpatchpanel.com/pme/   Austin TX 78758-3117

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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