News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Precompiled headers with MinGW

Started by lesnewell, November 08, 2005, 06:34:33 PM

Previous topic - Next topic

lesnewell

Hi, how do you tell C::B to use precompiled headers with MinGW? It works fine in Linux but in the Windows version I can't find any way of setting it up. In the past I have manually compiled the header but it would be nice to get C::B to do it for me. In both cases I am using RC2 of course!

Urxae

Right-click your file in the list to the left, Properties, check "Compile file", and be sure to put the "Priority weight" slider to something lower than that of any file that'll be using it so it'll be compiled before them.

lesnewell

Yup, did that. It works in Linux but not Windows. I am using the same project file with different targets for each platform. In the project properties I get a bunch of precompiled header options in Linux but they aren't there in Windows. How do I tell C::B that the compiler can handle precompiled headers?

mandrav

Quote from: lesnewell on November 08, 2005, 10:02:17 PM
Yup, did that. It works in Linux but not Windows. I am using the same project file with different targets for each platform. In the project properties I get a bunch of precompiled header options in Linux but they aren't there in Windows. How do I tell C::B that the compiler can handle precompiled headers?

The PCH options in project properties are in CVS, not in the released RC2.
Be patient!
This bug will be fixed soon...

lesnewell

Ah, that makes sense. The Linux version was built from CVS.. I will have another go tomorrow and see if I can figure out why it doesn't work. Thanks.

lesnewell

I found what the problem was. I had the Linux version generating the pch in it's own folder (precomp.h.gch). My Windows version is the official RC2 release so it does not have a setting to create a folder. It's internal dependency checking saw the folder and assumed it was actually an up to date header file so it refused to compile the header. Deleting the folder fixed the problem.