User forums > Using Code::Blocks
Can't build CodeBlocks (wxCheckListBox not declared)
gomer:
Hi again,
I think I have found the problem (and solution). I deleted both pre-compiled headers in codeblocks\src\include (sdk.h.gch and sdk_precomp.h.gch), and then rebuilt CB. It worked.
cheers
oBFusCATed:
Hm, When you hit "rebuild all" is the .gch file being deleted? If not why?
This is question to the devs...
Jenna:
--- Quote from: oBFusCATed on July 03, 2009, 11:06:48 pm ---Hm, When you hit "rebuild all" is the .gch file being deleted? If not why?
This is question to the devs...
--- End quote ---
They get deleted if you hit rebuild or clean, but not if you just hit build.
That's the danger when using precompiled headers. If you change a header, that belongs to the precompiled header the compiler does not notice it, because it's already included by the preocompiled header, even if it's not the actual version.
gcc always uses a precompiled header if it exists and does not check the headers for changes, if they are included by the pch, so cleaning or manually deleting is recommended.
And as thomas wrote before:
--- Quote from: thomas on March 01, 2008, 09:34:55 pm ---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.
--- End quote ---
But gomer only deleted one of two pch's:
--- Quote from: gomer on July 02, 2009, 08:23:26 pm ---I also tried deleting the precompiled header (sdk_precomp.h.gch).
--- End quote ---
That's most likely the problem in this case: we have two precompiled headers, one for C::B itself and one for the plugins, because they need different defines, but use the same headers, so both have to be deleted, or you use different headers for C::B and the plugins and that will most likely break the build and/or the application.
Navigation
[0] Message Index
[*] Previous page
Go to full version