This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: static linked glibc
- From: Ian Lance Taylor <iant at google dot com>
- To: Kolesar <asim dot husanovic at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 20 Jan 2009 07:31:09 -0800
- Subject: Re: static linked glibc
- References: <21561568.post@talk.nabble.com>
Kolesar <asim.husanovic@gmail.com> writes:
> I want static linked glibc (v2.8) with my program and after that run on any
> other linux, but i get error:
> ./hamo: /lib/libc.so.6: version `GLIBC_2.8' not found (required by ./hamo)
That program was evidently not statically linked.
> # gcc -o hamo -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0
> /usr/lib/libglib-2.0.a
> hamo.c -static-libgcc
The -static-libgcc option links libgcc statically. It does not link
libc statically. To do a fully static link, use -static.
Ian