Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
To: cygwin@cygwin.com
From: Alejandro Lopez-Valencia <dradul@etb.net.co>
Subject: Re: Creating DLL's for use with MSVC
Date: Wed, 10 Mar 2004 18:43:47 -0500
Organization: Casa de Cuckoo
Lines: 48
Message-ID: <c2o98k$j93$1@sea.gmane.org>
References: <D9B6A11B-7268-11D8-B092-000393C92B12@foi.se> <c2mv33$u1m$1@sea.gmane.org> <DEA1FE60-7295-11D8-B092-000393C92B12@foi.se>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Complaints-To: usenet@sea.gmane.org
Keywords: No keywords can be a good thing.
X-Gmane-NNTP-Posting-Host: 200.119.69.189
X-Archive: encrypt
Mail-Copies-To: never
X-Newsreader: Do you care?
X-UserAgent: Does it really matter?
X-Newsreader: Forte Agent 2.0/32.646
Reply-To: cygwin@cygwin.com

On Wed, 10 Mar 2004 14:21:41 +0100, Niklas Wallin wrote in
<DEA1FE60-7295-11D8-B092-000393C92B12@foi.se>:

Hi Niklas,
>
>Thanks for your answer Alejandro, I still can't get it right though.

You are welcome, but this has truly veered into the realms of the
off-topic.

So in order to pull it back on track, let's do a 'Gendankexperiment'
and suppose neither you or I ever mentioned the flag "-mno-cygwin".
Let's suppose instead that you managed to compile Tendra++ and want to
use Cygwin's GNU g++ to create a DLL with an import library that could
be used by the other compiler.

>
>Ok, the .def file then looks like this:
>
>EXPORTS
>     _ZN7MyClass8getValueEv @1
>     _ZN7MyClass8setValueEi @2
>     _ZN7MyClassC1Ev @3
>     _ZN7MyClassC2Ev @4
>     _ZN7MyClassD1Ev @5
>     _ZN7MyClassD2Ev @6

As CGF pointed out earlier, g++ and your other compiler decorate
functions differently, but you could create an exports aliasing table
in the DLL:

"""
LIBRARY mylibrary
DESCRIPTION "Blah, blah."
EXPORTS
	getValueEv = _ZN7MyClass8getValueEv @1
		.
		.
		.
	Ev2        = _ZN7MyClassD2Ev @6
"""

This is GNU binutils' equivalent to private function declarations in
that other win32 compiler.

Now, I can't say this will work for you, but it works for a couple of
things I use everyday...



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

