Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B6EC220.6EEE7D@ece.gatech.edu> Date: Mon, 06 Aug 2001 12:13:20 -0400 From: Charles Wilson X-Mailer: Mozilla 4.7 [en] (X11; I; SunOS 5.8 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Josep Lluis Colom CC: cygwin AT cygwin DOT com Subject: Re: Shared library question References: <3B6EA1F1 DOT CCBEC082 AT bpo DOT hp DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Josep Lluis Colom wrote: > > I used autoconf/automake/libtool to write a package that builds two > shared libraries in Linux, and it worked as expected. > Now I'm trying to do the port to Windows. > > After installing Cygwin software. I can't build the shared libraries. > After compiling the source modules, libtool complains with: "Warning: > undefined symbols not allowed in i686-pc-cygwin shared libraries". Only > '.a', '.la' and '.lai' files are built. Correct. Current (and CVS) versions of libtool do not easily build shared libs (DLLs) on cygwin. This will probably be corrected in the coming months, thanks to yesterday's new (experimental) binutils release. There is a hacked up version of libtool that uses pre-release versions of automake, binutils[as of yesterday, no longer pre-release], and friends to 'cleanly' build shared libs -- but it is a long way from even making it into libtool CVS, much less an 'official' libtool release. > Someone knows what its the pitfall? "doctor, it hurts when it do this" "Don't do that". You basically have three choices: a) live with static libs only b) wait a few months until the tools 'catch up'. (perhaps help develop/test those tools?) c) hack up your source code to explicitly build DLLs. This requires a lot of 'heavy lifting'. Take a look at the patch to the ncurses package, for an idea of what this entails. (Download the source package from a cygwin mirror, and look in /CYGWIN-PATCHES/) > (I'm using the same source files I used in Linux platform. Is that ok? > Shall I define some kind of dllexport like in plain Windows DLLs? Yep. > There's some clear sample hot to do it?) Well, other than the ncurses example, you can download dllhelpers-0.2.6 (NOT 0.2.7) from cygutils. (See recent ANN on this mailing list for URL). --Chuck -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/