Re: [Dev-C++] wxwindows problems again and again...
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <or...@vp...> - 2003-06-19 21:31:28
|
Brian Ackermann wrote: > I've been following this thread for a while, as I've had some similar > issues at various points....and now I have a question (rather, I had it > before, and just remembered now to ask it...) > > in the defines you gave > -D_X86_=1 -DWIN32 -D_WIN32 -DWINVER=0x0400 -D__WIN95__ -D__GNUWIN32__ > -D__WIN32__ -DSTRICT -DHAVE_W32API_H -D__WXMSW__ -D__WINDOWS__ > > I see three things that look the same (nearly) > > Whats the difference between > -DWIN32 -D_WIN32 -D__WIN32__ If plunge yourself deep into the wxWindows code (especially into the headers), you'll notice that some of those flags are needed. Some are defined by the others, some are not. Something like: #ifdef WIN32 # define _WIN32 #endif etc. I don't recall exactly, which are defined, which are not. So, it may be true, that not all of them is needed, but perhaps they are all needed. All I know is, that when I removed most flags I could, but still get my program to compile (minimal flags, WIN32 or one of them only, and a lot others removed) resulted in a run time crash. So, I suppose those defines do something good, so I decided to define them all. After all: these flags were digged out by me from the wxWindows MINGW makefiles (makeg95.env), and wxWindows uses these flags for it's sample programs too, so I think they are a must. I am talking about 2.4.0 however, but I don't think 2.4.1 has changed radically in this field... I have played around with it for some time. Maybe you can try different settings too. So, all in all: those defines are essential for a working wxWindows program. Don't ask why! I don't know. All I know, when they are all specified, things work, when not, things crash (but compile). Odd... :) I hope I made things more clear. -- Regards, Balázs |