Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Precompiled headers (PCH) support in Code::Blocks

<< < (6/8) > >>

rickg22:
Cool! Should we be working on the "New features in RC2" list now?

Ceniza:
Hmmm, stc was replaced by wxScintilla, right? So... what's <wx/stc/stc.h> doing in sdk_precomp.h?

[sarcasm]
Would it be too hard to fix?
[/sarcasm]

 :?

mandrav:

--- Quote from: Ceniza on October 21, 2005, 06:14:03 am ---Hmmm, stc was replaced by wxScintilla, right? So... what's <wx/stc/stc.h> doing in sdk_precomp.h?

[sarcasm]
Would it be too hard to fix?
[/sarcasm]

 :?

--- End quote ---

Ooops  :oops:, my bad. You see I had tried to use PCH before and I had this file ready...
I 'll fix this ASAP.

byo:
Ok, I tried to use PCHs in wxSmith and here's result (I don't really know what does it mean, maybe gcc bug  :?):


--- Code: ---...
ar.exe: creating propgrid\libpropgrid.a
Switching to target: wxSmith
mingw32-g++.exe   -Wall -g -pipe -mthreads -fmessage-length=0 -fexceptions -Winvalid-pch -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL -DcbDEBUG -DTIXML_USE_STL -DCB_PRECOMP -DWX_PRECOMP -DBUILDING_PLUGIN -g -DHAVE_W32API_H -D__WXMSW__ -DWXUSINGDLL    -I..\..\..\sdk -I..\..\..\sdk\wxscintilla\include -Ipropgrid\include -ID:\CodeBlocks\wxWidgets-2.6.2\include -ID:\CodeBlocks\wxWidgets-2.6.2\lib\gcc_dll\msw -ID:\CodeBlocks\wxWidgets-2.6.2\lib\gcc_dllNonUnicode\msw -ID:\CodeBlocks\wxWidgets-2.6.2\contrib\include  -IC:\MinGW\include -ID:\CodeBlocks\wxWidgets-2.6.2\include -ID:\CodeBlocks\wxWidgets-2.6.2\lib\gcc_dll\msw -ID:\CodeBlocks\wxWidgets-2.6.2\lib\gcc_dllNonUnicode\msw -ID:\CodeBlocks\wxWidgets-2.6.2\contrib\include -c defwidgets\wxsboxsizer.cpp -o .objs\defwidgets\wxsboxsizer.o
In file included from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../wxscontainer.h:4:17: calling fdopen: Bad file descriptor
In file included from defwidgets\/../wxscontainer.h:6,
                 from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../widget.h:4:17: calling fdopen: Bad file descriptor
In file included from defwidgets\/../widget.h:15,
                 from defwidgets\/../wxscontainer.h:6,
                 from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../wxsglobals.h:4:17: calling fdopen: No such file or directory
In file included from defwidgets\/../widget.h:16,
                 from defwidgets\/../wxscontainer.h:6,
                 from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../wxsproperties.h:4:17: calling fdopen: No such file or directory
In file included from defwidgets\/../widget.h:17,
                 from defwidgets\/../wxscontainer.h:6,
                 from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../wxswindoweditor.h:4:17: calling fdopen: No such file or directory
In file included from defwidgets\/../wxswindoweditor.h:9,
                 from defwidgets\/../widget.h:17,
                 from defwidgets\/../wxscontainer.h:6,
                 from defwidgets\/../wxsdefsizer.h:6,
                 from defwidgets\/wxsboxsizer.h:4,
                 from defwidgets\wxsboxsizer.cpp:1:
defwidgets\/../wxsproject.h:4:17: calling fdopen: No such file or directory

... (and few more)

--- End code ---

I've added #include <sdk.h> almost everywhere and CB_PRECOMP define, so it should at least work.
I've noticed that there's problem when <sdk.h> is included twice.

Compiling C::B was just ... exciting, these files were compiling so fast  :D But this :(

EDIT: I've made it working with PCH-s, wxSmith can be compiled in 5 minutes on my XP 2000+ :D. I've even made one more step and compilation time reduced to 1 min 47 sec :) really, I'll write about it tomorrow somewhere in RAD forums

tiwag:
hi byo
i just tried to compile wxsmith with your latest commit and had to do some changes until it built correctly for me.

1.) i cleaned wxsmith project and did a rebuild without using pch, i got linker errors something related to stl

2.) project cleaned by hand, ie. deleted all .obj's and .dll

3.) i manually compiled the wxsheaders.h to wxsheaders.h.gch
because the wxSmith_2_6.cbp project file has not marked the wxsheaders.h to use it pre-compiled.
(nice feature which Yiannis added into one of the very last CB commits, thanks to Yiannis btw. !!)

4.) rebuild was OK now.

really nice !

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version