News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

How to change path of wx_pch.h.gch?

Started by blockn102, December 10, 2008, 04:26:37 AM

Previous topic - Next topic

blockn102

How to change path of wx_pch.h.gch?

Project\wx_pch.h.gch\Debug_wx_pch_h_gch

I want custom path (move to C:\Temp\wxProjects) for easy to share project.

ollydbg

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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

stahta01

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ollydbg

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!

If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

stahta01

#4
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
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

ollydbg

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.





If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.