Can you explain why these defines are required?
Generally I don't like the whole precompiled stuff.
Every time I change a major header everything is recompiled, so annoying...
I would happily remove the pch and rework the headers to be less dependent.
From experimentation I think these two rules apply to defines and PCH file usage.
1. If an define is declared while compiling the PCH; then, it must be define while using the PCH.
2. If an [new] define is declared while using the PCH that effects the headers include by the PCH then it will not use the PCH.
The plan to fix the problem is to remove the code effected by defining cbDEBUG and BUILDING_PLUGIN [from the PCH file].
And, just to not define HAVE_W32API_H inside the windows projects. The wxWidgets 3.0 define it in code and it should not cause issues.
Note: It might cause issues in wxWidgets 2.8; did not check it out much in it.
cbDEBUG effects cbexception.h
The plan is to split part of the code in cbexception.h into a new header cbassert.h
BUILDING_PLUGIN effects cbplugin.h
The plan is to remove cbplugin.h from sdk_common.h
Both of those two patches will include a lot of files being changed.
The first one I have done a first attempt and I am sure it is likely possible to do.
Just have one small part of the patch that an C++ expert needs to confirm is correct.
The second patch will take a while to create to confirm the idea is valid.
Tim S.