Author Topic: Proposed rule "Do not include wx/wx.h inside the Code::Blocks SDK headers."  (Read 21496 times)

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
but not all of those 35 are for the wxFrame/wxWindow issue, those were 10 or so.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
@Tim : could you update to rev 4381 and adjust your patch to that one, I think it will shrink a lot ;-)

I am testing my update to SVN 4385, right now.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
on my linux I got things building, but by changing 2 source files (which I did NOT commit (yet)).

1) wxsradiobox.cpp
2) wxschecklistbox.cpp

Both complain about the fact they don't know their wx class things are dealing with. That's wxRadioBox and wxCheckListBox.
Although we include for those :
#include <wx/radiobox.h>
 and
#include <wx/checklst.h>

When you have a look at these  header they could be empty in case :
wxUSE_RADIOBOX
 and
wxUSE_CHECKLISTBOX
are not defined. Could be that this is the case. However when both cpp files get at first an extra include statement of 'wx/wx.h' then it compiles.

In case those preprocessor things are not defined, how should they be defined, including wx.h doesn't seem to me the correct way.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
The normal way is to include wx/defs.h to define wxUSE defines.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
will try this, at first glance (I already looked), wx/defs.h : no sign of for example 'wxUSE_RADIOBOX'

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5493
works : will commit

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
will try this, at first glance (I already looked), wx/defs.h : no sign of for example 'wxUSE_RADIOBOX'

Somewhere deep in the includes it includes setup.h and chkconf.h which defines 95% of wxUSE defines.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org