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: =?ISO-8859-15?Q?J=F6rg?= Schaible <joerg.schaible@gmx.de>
Subject: RE: Trying to link an MSVC DLL with a Cygwin Application
Date: Tue, 04 May 2004 19:42:22 +0200
Lines: 16
Message-ID: <c78klv$7kq$1@sea.gmane.org>
References: <8ED2FA87C8ACC04192709688DDFD5F5F09B9BF@calttsv025.cal.riotinto.org> <20040504055710.27230.qmail@web20604.mail.yahoo.com>
Reply-To: joerg.schaible@gmx.de
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
Content-Transfer-Encoding: 8Bit
X-Complaints-To: usenet@sea.gmane.org
X-Gmane-NNTP-Posting-Host: pd9eb81ad.dip0.t-ipconnect.de
Mail-Copies-To: never
User-Agent: KNode/0.7.7

john george wrote:

> Can i resolve the name mangling issue by adding the
> extern "C" declaration for every function that I'm
> exporting in the MSVC created DLL.
> I tried this but doesn't seem to work.Is there any
> other way to do this.

Be aware, that there is more than just a compatible call. You have to
recognize, that you have two different RT-libs and therefore also two
memory managers. Said that, you cannot allocate memory from the first one
and set it free on the second. While this is quite obvious with malloc and
friends, you have also to take care of strdup or fopen or ...

Regards,
Jörg


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

