precompiled headers ?

I want to use precompiled headers in QNX 6.21 ,but gcc before 3.4 doesn’t support precompiled headers , what can i do ? Hope your help !

Well if gcc doesn’t support them ;-)

You may be able to run the preprocessor on the header file (gcc -E) and then #include the results of that file, but it’s not the same as precompile header.

You could use ccache (it’s not exactly precompiled headers, but it does speed up the build process dramatically). We’ve been using it for a couple of years now. Compiles perfectly fine under QNX. To use it, add the follwing to your profile:
export CC=‘ccache qcc’
Of course, this assumes you are currently using qcc to compile your code. Might be even simpler if you’re using gcc directly.

Thanks ! I will to try the both methods.

Better late than never…

using the “-pipe” compiler command tells gcc to use pipes rather than temp files, this can give you a nice little performance boost.

Info here: … %20Options