static linking with glib

2003-01-27 Thread Alexander Varakin
Hi,

Is it possible to link with glib statically, so there will be no need to 
carry glib libraries?

Thanks,
Alex

_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: static linking with glib

2003-01-27 Thread Alexander Varakin
How?


From: Pavel Roskin [EMAIL PROTECTED]
To: Alexander Varakin [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: static linking with glib
Date: Mon, 27 Jan 2003 16:06:56 -0500 (EST)

Hello!

 Is it possible to link with glib statically, so there will be no need to
 carry glib libraries?

Yes.

--
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



_
Protect your PC - get McAfee.com VirusScan Online  
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: static linking with glib

2003-01-27 Thread Pavel Roskin
On Mon, 27 Jan 2003, Alexander Varakin wrote:

 How?

Good question :-)

Different methods I can think of:

1) Don't compile shared library if you don't have glib installed.

2) Make a directory, put a link to libglib.a there and add the directory
to LDFLAGS:

mkdir staticlibs
ln -s /usr/lib/libglib.a staticlibs/
make LDFLAGS=-L`pwd`/staticlibs
rm -rf staticlibs

3) Instruct the linker to pick the static library:
make GLIB_LIBS='-Wl,-Bstatic -lglib -Wl,-Bdynamic'

The same applies to all other libraries.

-- 
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel