is <wx/wxprec.h> always needed?

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Der_Caveman
In need of some credit
In need of some credit
Posts: 9
Joined: Thu Apr 24, 2008 6:49 am

is <wx/wxprec.h> always needed?

Post by Der_Caveman » Thu Jun 05, 2008 1:21 pm

Hello!

I don't use precompiled headers and I include all needed headers myself (without wx/wx.h).
I noticed that I never include <wx/setup.h> (which seems to be important).
The usual way of doing this seems to be including <wx/wxprec.h>, which includes <wx/defs.h> which inludes <wx/platform.h> which then includes <wx/setup.h>.
I also noticed that <wx/wxprec.h> includes a lot more before it includes <wx/wx.h>, if WX_PRECOMP is set.

Code: Select all

#ifdef WX_PRECOMP

// include "wx/wxchar.h" first to ensure that UNICODE macro is correctly set
// _before_ including <windows.h>
#include "wx/wxchar.h"

// include standard Windows headers
#if defined(__WXMSW__)
    #include "wx/msw/wrapwin.h"
    #include "wx/msw/wrapcctl.h"
    #include "wx/msw/wrapcdlg.h"
    #include "wx/msw/private.h"
    #include "wx/msw/missing.h"
#endif
Should I also add these includes?

TIA,
Caveman.

kevin_fly
Experienced Solver
Experienced Solver
Posts: 50
Joined: Tue Apr 15, 2008 12:55 am
Contact:

Post by kevin_fly » Thu Jun 12, 2008 1:31 am

no one know???

Post Reply