Code::Blocks Forums

User forums => Help => Topic started by: grunerite on December 23, 2005, 12:56:43 am

Title: specify precompiled header location in 1.0 rc2
Post by: grunerite on December 23, 2005, 12:56:43 am
Hello,

Windows, 1.0 rc2, WinXP

First, very nice IDE.

I'm having troubles getting the compiler to pick up my precompiled header. I've read the thread 'precompiled header strategy' in the developer forum, but I'm a little confused.  CB is saving my precompiled header in directory paralleling my object output directory, not the directory containing the header files. This is correct from what I understand. However, the compiler is not picking up the precompiled header, it is using the uncompiled header. I added the precompiled header directory to my include path, and before the path to the uncompiled header, but it still isn't picking it up. So, I have been manually copying my precompiled header to my normal header directory, and then my compile time is much-much shorter  :D

How do I
a ) specify that the precompiled header get saved in the same directory as the normal headers,

OR

b ) get the compiler to pick-up the precompiled header in the default directory it is put in?


Thanks and Happy Holidays,
grunerite






Title: Re: specify precompiled header location in 1.0 rc2
Post by: grunerite on December 23, 2005, 04:30:22 am
Hey,

Nevermind, I found my problem. My fault, and gcc was correct. In project build options, I had the 'uncompiled' header directory defined at project options level (not on purpose) and target options level, but only had the 'compiled' header diectory defined at target options level  :(  Hence, the uncompiled header was found first, of course. Oh, and I forgot to even tell you what compiler I was using (mingw/gcc). Sorry!

grunerite
Title: Re: specify precompiled header location in 1.0 rc2
Post by: mandrav on December 23, 2005, 08:51:11 am
You solved the problem yourself and that's always nice :)
But for anyone else that might search for info on PCH, look at this this wiki article (http://wiki.codeblocks.org/index.php?title=Precompiled_headers) for some extra pointers.