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 Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C6FF06C.5050703@ece.gatech.edu> Date: Sun, 17 Feb 2002 13:03:24 -0500 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: Stephano Mariani CC: cygwin AT cygwin DOT com, libtool AT gnu DOT org Subject: Re: How do I export only specific symbols? What name should I pass to lt_dlopen? References: <009f01c1b7b0$b367b590$01000001 AT sknet01> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Stephano Mariani wrote: > Hello, > > I am using the current libtool with cygwin 1.3.9 (all packages up to > date as of this morning): > libtool 20010531a-1 > libtool-devel 20020202-1 > libtool-devel-src 20020202-1 > libtool-stable 1.4.2-2 > > My project has to run on windows (NT/2000/XP) and Linux (2.4.9) and > Solaris (8). > > Here is the relevant portion of the makefile Makefile.am: > > [snip] > > lib_LTLIBRARIES = libsk.la > libsk_la_SOURCES = ... > libsk_la_LDFLAGS = -no-undefined -export-dynamic -version-info 1:0:0 > -module -export-symbols sk.sym > libtool uses '--export-all-symbols' in its link command, which apparently overrides your '-export-symbols sk.sym' option. (BTW, -export-dynamic seems to have no effect in cygwin binutils.) However, including a .def file in the list of objects to be linked will override '--export-all-symbols'. I think. > [/snip] > > However, when examining the libsk.dll.a on windows, ALL the symbols are > exported! I have yet to see if the patched libtool even works on Linux > or Solaris. It works on Linux, for me. > > How do I specify a .def file for windows targets? The .sym seems to make > no difference. You need to figure out how to add the .def file to libsk_la_OBJECTS -- I'm not sure how to do that. As far as doing it conditionally (e.g. only on windows) -- first things first: figure out how to add it AT ALL...then worry about conditionalizing it. --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/