delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/01/03:43:59

From: jvs AT bbn DOT com (Jim Van Sciver)
Subject: Re: GNU-Win32 DLL and MSVC++
1 Sep 1998 03:43:59 -0700 :
Message-ID: <199808311920.PAA23936.cygnus.gnu-win32@jubilee.bbn.com>
References: <19980829130513 DOT 15719 DOT rocketmail AT send102 DOT yahoomail DOT com>
To: earnie_boyd AT yahoo DOT com
Cc: gnu-win32 AT cygnus DOT com

> Earnie Boyd <earnie_boyd AT yahoo DOT com> writes:
> An example was given just recently on how to do this.  Please go back
> to the archives and search for `MSVC AND dll'.

Thank you for the reply.  I did a better search (the search engine
Cygnus uses on the GNU-Win32 doesn't work very well) and found the
following information regarding EGCS C++ DLLs and MSVC++.  First,
Mark Becker asked my exact question:

>> Mark Becker (Mark DOT Becker AT neuroinformatik DOT ruhr-uni-bochum DOT de) writes:
>> How do I manage to link an egcs-(or gcc) built dll (here: libX11.dll)
>> to a C++-mainprog (compiled with MSVC++-5.0) with the MSVC linker ?

> jeffdb (jeffdbREMOVETHIS AT goodnet DOT com) writes:
> Bad news, this is impossible for several reasons.
> 
> 1. binary incompatibility between MS/CYGNUS pei libraries (currently being worked on :)
> 2. name mangeling/abi incompatibility between MS/gnu C++ (according to the gnu G++ FAQ this is unresolvable
>     since MS's abi is proprietary although I seem to recall having heard that it is being worked on)
> 3. dll startups for cygwin32 dlls need to initialize the cygwin32 posix layer, which
>     means using the cygwin32 mainCRTStartup, which you can't with link.exe because AFAIK
>    it can't manufacture the __data_start__ __text_start__ etc. symbols in the proper places.

This is disappointing.  I was hoping to be able to create MSVC++ compatible
DLLs from legacy C++ code developed with EGCS.  Now I'm forced into porting
over to MSVC++ instead.  Drat, drat, drat.

The above question/reply should definitely be added to the FAQ.
I'm cc'ing the gnu-win32 list to make this known.

Thanks again for the prompt and helpful reply.


Jim Van Sciver
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


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