This is the mail archive of the cygwin@sourceware.cygnus.com 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 <pgarceau@submergedsoftware.com>
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
appreciated.
>
> 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
any
>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 :-(

Colin.

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 fu.is.saga-u.ac.jp
-- Saga University Dept. of Information Science
-- http://www.fu.is.saga-u.ac.jp/~colin
-- http://www.geocities.com/Tokyo/Towers/6162

mmsystem.h


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