Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- statically-linked executables
November 6, 2004, 6:20 pm
rate this thread
Re: statically-linked executables
I answered this recently elsewhere, so I'll just repost:
It you want to build the entire thing statically, it's just a matter of
adding the "static" flag for your compiler (for gcc that's "-static",
other compilers will vary). This is probably not a good idea since it's
not a supported ABI on Solaris and is pretty much guaranteed to break at
If you just want to statically link OpenSSL and zlib then basically you
just need to make sure that the linker finds static libraries first.
One way to do this would be to create a directory containing only the
static libraries and tell the linker to look there first. Something
like this ought to work (untested):
ln -s /usr/local/ssl/lib/libcrypto.a /usr/local/staticlib/libcrypto.a
ln -s /usr/local/lib/libz.a /usr/local/static/lib/libz.a
./configure --with-ldflags=-L/usr/local/staticlib \
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
- » Only accepting ssh tunnelling requests from a particular IP?
- — Previous thread in » Secure Shell Forum
- » ssh on command line: force using a group size (prime size) of 1024 (and no...
- — Newest thread in » Secure Shell Forum