This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static linked glibc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]