This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Petzold and Mingw32 (Was: Re: MS Platform SDK)

From: Paul Garceau <>
Date: Thursday, November 27, 1997 4:42 AM
>>  I would really like
>> to be able to get the SDK to work, so I'd appreciate any help you can
>> give.  (My main reason is that I am trying to get the programs given in
>> "Programming Windows 95" by Charles Petzold to compile with a free
>> compiler.)  Any help/advice you can give me would be greatly
> Most of those "should" compile with either Cygwin32 or mingw32 as long
>as the headers are set up properly and there are no references to APIs
>such as the MS DirectX.
> Any MS APIs that might exist such as DirectX 4 or later do not have
>any corresponding headers pre-defined for their respective DX APIs.  The
>available Win32 headers for mingw32 (Minimalist GNU-C/C++) can compile
>Win32 based programs that you might have, including DX3.

While I'm happy to hear that Mingw32 works so well :-) there is at least
one point where the definitions and such for an example from the Petzold
book won't work with the GNU version of the Win32 API files (it will work
with the Platform SDK files if you get them to compile). The first example
("Hello Windows 95!") uses some mmsystem.h definitions which haven't made
it into the API files yet. I posted a short mmsystem.h file some time ago
on this list which is enough to get this working. It's short, so here it
is again... as an attachment.

You might also want to note that many examples that use resource files
will not compile out of the box with rcl. Try rc.exe from the MS Platform
SDK if you can, or modify the resource files to always use BEGIN and END
instead of { and }, plus don't use any accelerators and don't expect
dialog boxes to work :-(


P.S. I have used the new integrated (includes res2coff like capability)
windres from Mumit Khan's EGCS package, but it seems to (1) GPF on
accelerator tables (at least RCL only gave syntax errors) and (2) work
even worse on dialog boxes.

P.P.S There seems to be a bug in res2coff that makes dialog boxes not work
very well in any case (even with MS rc.exe). I'm working on it.

-- Colin Peters -- colin at
-- Saga University Dept. of Information Science


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]