[Top][All Lists]

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

Help with static linking

From: Kip Warner
Subject: Help with static linking
Date: Thu, 30 May 2013 22:30:29 -0700

Hey lists,

Sorry for posting on both autoconf and automake lists. I wasn't sure
which one would be more appropriate for this problem.

I know this has come up before, judging by the archives, but I cannot
figure out the best way to have my executable statically link against
certain dependencies. This is needed because it executes off of optical
media and I cannot always guarantee that the user's runtime environment
will have the needed dependencies and shipping them shared would be a
maintenance nightmare.

The dynamic dependencies, according to objdump, are the following...

Dynamic Section:

libc, pthreads, the C++ runtime, etc., are safe to assume are available,
but the rest I'd like to statically link against. Actually, I'd prefer
to statically link against everything that I can if possible. But the
ones for certain I know I should be able to statically link against are
at least libzzip and libpng.

I know there a number of different approaches to doing this, but from
the pieces scattered in various places, it was difficult to determine
the most reliable and recommended approach. For instance, I've tried
'myproduct_LDADD = $(LIBINTL) -static', but objdump still reports all of
the above dynamic dependencies, so maybe it's not doing what I thought
it was suppose to do.

This is my

This is my

Any help appreciated.


Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred

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

reply via email to

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