Mail Archives: djgpp/1996/06/07/14:06:47
"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 -