User forums > Using Code::Blocks
Can't build CodeBlocks (wxCheckListBox not declared)
Azra:
I don't really know anything about CB's insides, so I don't feel like editing any code on my own :? .. Can anyone tell me what's wrong here (look at image)
[attachment deleted by admin]
thomas:
If you have built Code::Blocks before (maybe a few weeks or months ago), it may be a conflict with precompiled headers. Deleting them should fix the problem.
If that is not the case, I guess it might be something wrong with your wxWidgets build.
Rationale:
1. it works for me
2. it says wxCheckListBox was not declared
3. it does not complain that it couldn't find a header file
Something not being declared usually has two possible causes (apart from the obvious cause that it simply doesn't exist). Either, it is not declared because some #ifdef/#ifndef disables it, or the header was not included due to incorrect include paths.
If there was a problem with your include paths, the compiler would complain "cannot find include file", but it doesn't.
Azra:
I've checked the header file, where wxCheckListBox is declared and found out, that it's not included explicitly. But there are these lines in the wx/checklst.h which IS included:
--- Code: ---#if defined(__WXUNIVERSAL__)
#include "wx/univ/checklst.h"
#elif defined(__WXWINCE__)
#include "wx/msw/wince/checklst.h"
#elif defined(__WXMSW__)
#include "wx/msw/checklst.h"
#elif defined(__WXMOTIF__)
#include "wx/motif/checklst.h"
#elif defined(__WXGTK20__)
#include "wx/gtk/checklst.h"
#elif defined(__WXGTK__)
#include "wx/gtk1/checklst.h"
#elif defined(__WXMAC__)
#include "wx/mac/checklst.h"
#elif defined(__WXCOCOA__)
#include "wx/cocoa/checklst.h"
#elif defined(__WXPM__)
#include "wx/os2/checklst.h"
#endif
--- End code ---
each of theese files contains the declaration of wxCheckListBox.
I've checked the #defines in the build options - __WXMSW__ is defined. I don't understand what the problem is...
Jeisson:
I had also this problem. I discovered it is related to wxSmith plugin, when the automatic generated code moves the <wx/checklst.h> include to the top of the list, in the header of the dialog/frame you are editing. When I moved this include to the bottom of the headers, the project compiled again.
I do not know the cause. I hope it could be fixed.
So many thanks for this wonderful IDE!
gomer:
Hi,
I also have the same problem compiling CB (in compileroptionsdlg.cpp). I tried moving the #include <wx/checklst.h> to the bottom of the list of headers, but that did not help.I also tried deleting the precompiled header (sdk_precomp.h.gch). I built wxWidgets as per the instructions in "Installing CodeBlocks from source on Windows - CodeBlocks.htm". Has this issue been fixed? (my CB source is from Nov 20,2008 and wx is wxWidgets-2.8.10).
thanx
Navigation
[0] Message Index
[#] Next page
Go to full version