[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to create a static binary with g++?
From: |
Thomas Müller |
Subject: |
How to create a static binary with g++? |
Date: |
Mon, 17 May 2004 12:30:52 +0200 |
User-agent: |
KNode/0.7.7 |
I want to create a binary consisting of one file, that needs no libs to be
installed.
The only lib it needs is smtp++, trying to compil with:
>g++ -static -lsmtp++ example_3.cpp
Gives me an error like this:
> /usr/lib/gcc-lib/i586-suse-linux/3.3.1/../../../../i586-suse-linux/bin/ld:
> cannot find -lsmtp++
> collect2: ld returned 1 exit status
As you can see, im using Suse ;). When i try to compile without -static the
program works, but only on my linux with smtp++ installed. I googled, but i
didnt find a howto create static binaries :(
Thx for any help
--
gnuPG key: 0x012CF58B
- How to create a static binary with g++?,
Thomas Müller <=