Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <4373F3CF.2020409@cwilson.fastmail.fm> Date: Thu, 10 Nov 2005 20:28:47 -0500 From: Charles Wilson User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: libtool: static libs where shared can't be built References: <4373C3BB DOT 3010407 AT users DOT sourceforge DOT net> In-Reply-To: <4373C3BB.3010407@users.sourceforge.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Yaakov S (Cygwin Ports) wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I have a libtool library that has undefined symbols by design, so I need > to build it static. But that seems to be impossible: > > 1) Simply omit '-no-undefined': > > 2) Add '-no-undefined -static' to LDFLAGS: > > Either way I get empty static libs. Is there any way to make this work? First what does "/bin/sh ../libtool --version" say, when you run it in your build directory? If it doesn't say 1.5.20, then you need to re-libtoolize your project. Second, the "right" way to do this is the following: 1) since you have undefined symbols, you shouldn't lie to libtool by saying "-no-undefined'. On cygwin/mingw, that SHOULD be enough to ensure that only a static library is built. However, you'd still get a shared library on other platforms. 2) If you want static only, for all platforms, but just for this particular library, then if you're using automake --- use target-specific LDFLAGS: libkscreensaver_la_LDFLAGS = -static [other flags like -version-info] (or otherwise pass -static [but NOT -no-undefined] to libtool) 3) Now, this is assuming that libkscreensaver is intended to be an installed library. If not, the 'info libtool' and search for 'convenience library' -- Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/