delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/03/11/02:35:48

From: earnie_boyd AT hotmail DOT com (Earnie Boyd)
Subject: Re: Mingw32 & Cygwin32 (b19)
11 Mar 1998 02:35:48 -0800 :
Message-ID: <19980310140241.24710.qmail.cygnus.gnu-win32@hotmail.com>
To: pgarceau AT teleport DOT com
Cc: gnu-win32 AT cygnus DOT com


>From: "Paul Garceau" <pgarceau AT teleport DOT com>
>To: "Earnie Boyd" <earnie_boyd AT hotmail DOT com>
>Date: Mon, 9 Mar 1998 14:59:17 -0800
>Subject: Re: Mingw32 & Cygwin32 (b19)
>Reply-to: pgarceau AT teleport DOT com
>
>Hi Earnie,
>
>	thanks for getting back to me.

You are welcome.

>
>On  9 Mar 98 at 4:55, the Illustrious Earnie Boyd wrote:
>
>> >Mingw32 and Cygwin32 (b19).
>> >
>> >	1.	Can they co-exist? (Newbie question)
>> >
>> >	By co-exist, I mean is it possible to use headers or libs from both 
>> >Mingw32 and Cygwin32 to compile single executables?  
>> >
>> >	If so, this would seem like an excellent way to enable any cygwin32 
>> (b19)
>> >programs to be "thread safe".  As I understand it, cygwin32 (b19) is 
>> not 
>> >"thread safe" whereas Mingw32_gcc-2.8.0 is.
>> >
>> 
>> Why not just compile everything as Mingw32?
>
>	Apparently there is absolutely no support for the DX API set 
(including 
>D3D) under Mingw32.  However, someone has made available a set of 
headers 
>and a .dll for ddraw based applications under cygwin32.

Chances are that that .dll does NOT contain cygwin.dll dependencies.  
Test it out by compiling a test program under Mingw32, moving the 
libraries and headers appropriately so that only the needed direct draw 
headers are used.  Then run the program under Win32 without having 
cygwin.dll within the realm of your PATH variable.  If you get a missing 
dll error popup box then it is cygwin.dll dependent.

>
>>  I have been working on
>> porting utilities to Win32 using Mingw32.  I have a working set of
>> binaries from fileutils, textutils, grep and sh-utils.  I am 
currently
>> working on a Mingw32 bash-2.01
>
>	I am glad to hear this.  I prefer to use Mingw32.  Alas, without any 
DX 
>(ddraw or d3d) support it appears that I am, more or less, "dead in the 
>water" when it comes to porting DX based packages from Win95/98 based 
>platforms.
>

The DirectX sdk can be downloaded from MSDN.  You get the headers a the 
..lib files.  You can translate the .lib files to lib.a files like this:

Using ddraw.lib as an example:

nm --demangle --defined-only ddraw.lib | grep "00000000 T " | sed -e 
's/00000000 T //' > ddraw.def

edit the ddraw.def and add a line with EXPORTS at the top.

dlltool --def ddraw.def --output-lib libddraw.a --dllname ddraw.dll


With the above method you get the @## appended appropriately.  If you 
don't have or can't get the .lib and you only have the .dll then you 
have to use impdef and figure out what to add.

>> 
>> 
>> >	Are the executables compiled under b19, in fact, "thread safe"?  
The 
>> >cygwin32 FAQ is unclear about this.
>> 
>> No, executables compiled under b19 will be as "thread safe" as the 
>> cygwin.dll itself is.  If you avoid the routines in the cygwin.dll 
then
>> you might stand a chance at being thread safe.
>
>	So, in essence, even the executables compiled under b19 will not be 
>thread safe without some way of separating those non-"thread safe" 
>routines from those routines that are "thread safe".  Is this correct?

Correct.

>
>	Thanks again for getting back to me on this.
>
>	Peace,
>
>		Paul G.
>
>Information Systems Consultant
>NewDawn Productions
>http://www.teleport.com/~pgarceau/newdawn/
>


Note: if anyone on the list finds that this example is missing 
something, please let me know.

Thanks,

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd AT hotmail DOT com-
------ooo0O--O0ooo-------



______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
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