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: From: "Kenneth Sandberg (ERA)" To: "'cygwin AT sources DOT redhat DOT com'" Subject: RE: Problems using a DLL created with GNU from Microsoft VC++ Date: Mon, 14 Aug 2000 07:57:26 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2651.58) Content-Type: text/plain; charset="iso-8859-1" X-OriginalArrivalTime: 14 Aug 2000 05:57:23.0234 (UTC) FILETIME=[83F29820:01C005B4] >On Tuesday 8 Aug 00, Kenneth Sandberg (ERA) writes: >> I am trying to use a DLL created with cygwin g++ from an application >> created with Microsoft Visual C++. The reason is that I have C-code >> (huge) that is created for GNU and would like to use it in an >> application that requires Microsoft Visual C++. > >The FAQ says: > > Can I mix objects compiled with msvc++ and gcc? > > Yes, but only if you are combining C object files. MSVC C++ > uses a different mangling scheme than GNU C++, so you will > have difficulties combining C++ objects. > >Does that apply to you? > >David No, I think the problem occurs when a function using the memory is called. It works if the printf()-statement is deleted from the DLL. In this case, the DLL only performs one add. The same thing happens even if there isn't any arguments passed to the function. I think the problem resides in the cygwin1.dll. Maybe there is an initialization call missing in the DLL when the DLL is called from a MC++ compiled program? If the DLL is called from a cygwin-compiled code, it works. Is this case, the cygwin1.dll is already initialized by the calling program. /Kenneth Sandberg -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com