automake
[Top][All Lists]
Advanced

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

problem using the .a libs ...


From: Roberto Alejandro Espí Muñoz
Subject: problem using the .a libs ...
Date: Mon, 10 Dec 2007 00:08:46 -0400

Hi !! I tried building my project using the example from the automake
documentation in which i *_LDADD* the static libs in the compilation
process.  My project has about 10 directories and in each one I have
something like this:

directoryX/Makefile.am:
elementos = file1.cpp file2.cpp

noinst_LIBRARIES = libDirectoryX.a
libDirectoryX_a_SOURCES =     \
   $(elementos)

AM_CXXFLAGS = ...
AM_LDFLAGS = ...

Each X is  a number .. directory1, directory2 ... etc ...

In the root directory of my project I have this Makefile.am

link_objects_a = \
    directory1/libDirectory1.a     directory2/libDirectory2.a
directory3/libDirectory3.a ... and so on ...

SUBDIRS = ./directory1 ./directory2 ./directory3 ... and so on ...

bin_PROGRAMS = program

program_SOURCES = main.cpp
program_LDADD =  $(link_objects_a)

program_CXXFLAGS = ......
program_LDFLAGS = .......

I get an error of undefined functions in some of the libDirectoryX.a's with
functions from another libDirectoryX.a.  The funny thing is that it only
happens when I use this notation of *directoryX/libDirectoryX.a *for all my
directories.  If I use the *directoryX/*.o* notation on the libDirectoryX.a's
that give me the problem, the error disappears.

Can anyone tell me if they've had any similar problems?? or none at all??
-- 
teratux
------------
http://teratux.blogspot.com


reply via email to

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