Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: blockn102 on December 10, 2008, 04:26:37 am

Title: How to change path of wx_pch.h.gch?
Post by: blockn102 on December 10, 2008, 04:26:37 am
How to change path of wx_pch.h.gch?

Code
Project\wx_pch.h.gch\Debug_wx_pch_h_gch

I want custom path (move to C:\Temp\wxProjects) for easy to share project.
Title: Re: How to change path of wx_pch.h.gch?
Post by: ollydbg on December 27, 2008, 07:48:00 am
I have tried to find some option or directory setting to change this default behavior, But I'm sorry, I can't find the method.

But It's useful to change the PCH folder to share with all the wxWidgets projects.
Title: Re: How to change path of wx_pch.h.gch?
Post by: stahta01 on December 27, 2008, 08:04:22 am
The pre-compiled header has three options were the pch file is saved.

Look under
"Project" -> "properties"
section called "precompilied header" strategy

I used the default option it works good, but not sure any of the options does exactly what you want because I do not understand the problem you wish to fix.

Tim S

Title: Re: How to change path of wx_pch.h.gch?
Post by: ollydbg on December 27, 2008, 08:17:26 am
thanks for your reply.
I will restate my question:

Suppose I have two wxWigets project ,say  projectA and projectB.
I wonder whether these two projects can share the same PCH output files.
By default. the PCH output is located in projectA\wx_pch.h.gch and projectB\wx_pch.h.gch, so I want to set them to the same path to save disk space and compiling time.

Thanks again!

Title: Re: How to change path of wx_pch.h.gch?
Post by: stahta01 on December 27, 2008, 08:38:48 am
And, the reason you can not move the wx_pch.h to an common folder is what?
Or did you not try that?

The wx_pch.h determines the PCH file locations in 2 of the 3 settings.
Note: PCH means pre-complied header is this case called wx_pch.h.gch

Note: I do not use the header wx_pch.h file myself so not sure what it contains.
I use the <wx/wxprec.h> directly.

Tim S
Title: Re: How to change path of wx_pch.h.gch?
Post by: ollydbg on December 27, 2008, 08:53:04 am
Quote
And, the reason you can not move the wx_pch.h to an common folder is what?
Or did you not try that?

The wx_pch.h determines the PCH file locations in 2 of the 3 settings.
Note: PCH means pre-complied header is this case called wx_pch.h.gch
Oh, Yes, you are right, I haven't thought to move the wx_pch.h to a common file. Thanks.

Quote
Note: I do not use the header wx_pch.h file myself so not sure what it contains.
I use the <wx/wxprec.h> directly.
wx_pch.h file do nothing except include  <wx/wxprec.h>.

That's the work by code::blocks's wizard.

using the  <wx/wxprec.h> directly can really save OP's problem, that's because the PCH output file will be located in wx/.....

Thanks for your informative suggestion.