www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/06/07/14:06:47

Xref: news2.mv.net comp.os.msdos.djgpp:4701
From: malcolm AT manawatu DOT gen DOT nz (Malcolm Taylor)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Windows for djgpp
Date: Fri, 07 Jun 1996 03:30:50 GMT
Organization: Grafik Software
Lines: 35
Message-ID: <4p8bis$2c6@news.manawatu.gen.nz>
References: <211A05B344F AT fs2 DOT mt DOT umist DOT ac DOT uk>
Reply-To: malcolm AT manawatu DOT gen DOT nz
NNTP-Posting-Host: malcolm.manawatu.gen.nz
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> wrote:

>  It seems that, to write Windows applications in djgpp, I must write in the
>ordinary way, produce an A.OUT, and then translate that A.OUT to an *.EXE with
>RSX. But RSX does not have a WINDOWS.H file, and I am told to get one where I
>can. The one WINDOWS.H file that I have (it is Visual C++'s) contains these
>definitions, and often uses the words thereby defined:-
>    #define FAR               _far
>    #define NEAR              _near
>    #define PASCAL            _pascal
>    #define CDECL             _cdecl
>  So that djgpp can read this WINDOWS.H, can I simply equivalence these four
>words to null? Or edit them out wherever they occur?

These are mostly for 16bit code. I can bet your windows.h file is for
only 16bit code. You can get a windows.h file from the cygnus
distribution or from the wine, but niether of these is very complete
(to my knowledge).

FAR should be defined to nothing (16bit keyword)
NEAR should similarly be defined to nothing (16bit)
PASCAL is used for all the 16bit API calls...
CDECL is the standard c calling convention, I think this is the gcc
default, but check the docs (under function attributes).

Win32 API functions are all defined STDCALL which is a defined
function attribute for gcc (once again check the docs).

After saying all this I think that RSXNT comes with some headers. One
thing that causes a problem under Windows is using libc.a calls, I'm
not sure what the solution to this is though. There are some better
libraries available on the same site as RSX with the new emx port.

Malcolm

- Raw text -


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