delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/23/06:35:37

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
MIME-Version: 1.0
Subject: RE: linking cygwin built dll with Borland C++Builder
X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3
content-class: urn:content-classes:message
Date: Thu, 23 May 2002 20:34:56 +1000
Message-ID: <FC169E059D1A0442A04C40F86D9BA7600C6148@itdomain003.itdomain.net.au>
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
From: "Robert Collins" <robert DOT collins AT itdomain DOT com DOT au>
To: "Dennis Jarosch" <ya_luva AT uni DOT de>, <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id g4NAZbg19322

Mixing C++ between compilers generally doesn't work. See the c++-faq
lite for more details.

Rob


> -----Original Message-----
> From: Dennis Jarosch [mailto:ya_luva AT uni DOT de] 
> Sent: Thursday, May 23, 2002 8:33 PM
> To: cygwin AT cygwin DOT com
> Subject: linking cygwin built dll with Borland C++Builder
> 
> 
> Hi!!
> 
> I have successfully built a .dll with cygwin (c-Files, using the 
> mingw-compiler) and converted it to a .lib using Borland's implib.
> 
> Using the .lib in my Borland C++Builder 5 project is no 
> problem at all, 
> however there seem to be alignment problems between the gcc .dll/.lib 
> and the Borland code. :-(
> 
> The problem is that I have created a C++ wrapper to the c-dll 
> and I am 
> exchanging data with structs. I have a malloced mem-space containing 
> structs and as I iterate through it, the struct-data gets 
> mixed up. What 
> I am saysing is that only the first element is correct. I 
> have been able 
> to (dirty hack) solve this problem by casting to char* and 
> incrementing 
> by 4 byte * iteration, because this is what is lost in every 
> iteration.
> 
> Also, when I try to free the allocated mem-space I sometimes get 
> exceptions, which I suspect is due to the different interpretation of 
> the structs in memory!
> 
> I have tried the -fnative-struct switch in gcc, as well as many other 
> flags. I have also played with Borland's alignment (byte... 
> quad word).
> 
> Has anyone made similar experiences, or does anybody have any 
> hints on 
> how to correct these problems?
> 
> Please help! ;-)
> 
> Thanks!
> 
> Dennis
> 
> PS: I am not subscribed to the list
> 
> 
> 
> --
> 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/
> 
> 

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