curl-library
Re: How to make a statically linked binary in linux with curllib
From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 16 Mar 2009 23:50:47 -0600
Date: Mon, 16 Mar 2009 23:50:47 -0600
On Tue, Mar 17, 2009 at 10:47:20AM +0530, sourav roy wrote:
> 1.How I can make a statically binary in linux as I don't want to export
> LD_LIBRARY_PATH before running the binary.
> I know that it will make size of binary bigger but really want it.
>
> here is line to build my binary
> gcc -I/usr/local/include/curl/ -L/usr/local/lib64 -L/usr/local/ssl/lib -lcurl
> -lssl -lcrypto -o test1 test1.c
> before running i m sourcing the LD_LIBRARY_PATH
Try this: gcc `curl-config --cflags --static-libs` -o test1 test1.c
>>> Dan
-- http://www.MoveAnnouncer.com The web change of address service Let webmasters know that your web site has movedReceived on 2009-03-17