[Top][All Lists]

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

Building a static library consisting of libraries

From: Norbert Sendetzky
Subject: Building a static library consisting of libraries
Date: Mon, 12 Jun 2006 12:02:06 +0200
User-agent: KMail/1.9.1

Hi all

I ran into a rather tricky problem, but let me explain a little bit more in 
detail first:

I've created a library (opendbx, a unified database layer) which uses backend 
libraries (like to interface the native database library 

Now I want to create a static libopendbx.a which contains the main library and 
all backend libraries. The problem is that I have to compile the all objects 
twice, once with libopendbx_la_LDFLAGS="-module -version 1:0:0" and a second 
time with libopendbx_a_CPPFLAGS="-ODBX_STATIC" and binding them to a single 
library fails.

Building the static libraries individually works but binding the libopendbx 
object with the libXXXbackend.a libraries fails (nm tells me that the file 
format for the backends is unknown). If I list the object files in 
libopendbx_a_LIBADD instead, it works but it contains no dependency 
information about the native libraries. So I've tried to build separate 
static backend libraries ( with dependency informations 
instead, but linking fails also miserably ("ar cru" can only handle objects).

The big question now: Is there a way to get around this?

Thanks for any suggestions

OpenPGP public key

Attachment: pgppXovZ1gdi5.pgp
Description: PGP signature

reply via email to

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