delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/29/18:57:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <3D6EA6BC.4050006@etr-usa.com>
Date: Thu, 29 Aug 2002 16:57:00 -0600
From: Warren Young <warren AT etr-usa DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cygwin-L <cygwin AT cygwin DOT com>
Subject: Re: dll versus so
References: <3D6E599D DOT 2040808 AT netcom DOT es>

Ignasi Villagrasa wrote:
> 
> I call A.so from an executable B. B and A.so have several routines 
> duplicated. 

Sounds like you're _trying_ to make trouble for yourself.  <shakes head>

If I were managing your project, I would suggest that you make one of 
several architecture changes to the project:

1. Give the functions in A.so and B different names so there is no clash 
for the linker to resolve.

2. If the functions within A.so which are named the same as functions in 
B are never used by B or any other client of A.so, make the versions 
within B.so "static".  This may require some reorganization of code. 
Failing that, there is a way to make the linker not export the functions 
through the Windows DLL interface, but I forget how to do this.  Chances 
are excellent that GCC supports Microsoft's keyword syntax to do this, 
so searching on http://msdn.microsoft.com/library/ may be helpful. 
Failing that, read the GCC docs.  The __attribute syntax may have an 
element you can use.


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019