Mail Archives: djgpp/1999/05/09/20:50:36
miller matthew william wrote:
>
> > > bitmaps.c:285: parse error before 'MainWndProc'
> > #include <windows.h>
> > a terse answer to a terse question, but my crystal ball is in the shop.
> windows.h is already included. Can another solution be suggested?
> ---bitmaps.c---
> [bitmaps.c omitted.]
I assume that you are compiling this program with DJGPP + RSXNTDJ.
(Otherwise it would be off-topic here, wouldn't it?)
The first problem is that this program appears to be a Windows (at most)
3.1 program using the Windows API. And the Windows API is fundamentally
different from the Win32 API that's in Windows 95/NT. There are some
conversion work that needs to be done to make it a Win32 program.
Nothing major, but quite delicate. Microsoft has several articles on
this matter, search their web site for things like "Getting ready for
Chicago".
The WinMainProc prototype, for example, should be
LRESULT CALLBACK WinMainProc(HWND, UINT, WPARAM, LPARAM);
The second program is that this program appears to be written for a
compiler that defines "__TSC__". Although the compiler specific code
was guarded by #ifdef/#endif pairs, the presence of only one such pair
suggests that the program was written and tested only for that
particular compiler. And chances are good the the author used
non-standard features that's unique to that compiler elsewhere in his
code without mentally noticing it. As a general rule, (at least the
code I've seen), projects written for one compiler usually doesn't
compile under another compiler. (The only exception to this rule was
that I compiled a DOS program written for Borland compiler with DJGPP
once.)
Unless you want to learn the 16-bits Windows API, may I suggest that you
start from some other place (a current Win32 book, maybe?).
--
Weiqi Gao
weiqigao AT a DOT crl DOT com
- Raw text -