User forums > Help
Precompiled header gives me error: stray 216
smallB:
Guys, first answer to your question:
Yes, I did succeed with precompiling this file via command line, that's why I'm baffled why I cannot do this with cb (same compiler parameters).
@Morgen "Is_Char.h" is the first file posted here on this thread.
Anyway here is my question:
I have precompiled file called Promote.h. The resulting file has name Promote.h.gch. I've created completely new project and've pasted in this project directory this precompiled header. When I try to use this class from this precompiled header it gets compiled again (although unsuccessfully - the only way I can successfully precompile it is via command line). So this file despite the fact being precompiled gets compiled again (I see the output on build messages window) and this compilation cannot successfully finished. I'm getting tons of warnings, no error is listed.
My question is:
1. Is that correct behaviour of cb? Why the precompiled header gets (and how?) compiled again?
2. Why this file compiles successfully via command line but not via IDE? The same params are sent via command line (I just copy them from a build log).
3. Is there a way to make cb not compile it and just use this precompiled header?
Regards
@Obfuscated, sorry for posting here, I didn't now where to post it, could you please tell me, so next time I know the correct place.
oBFusCATed:
--- Quote from: smallB on October 28, 2011, 05:18:15 pm ---@Obfuscated, sorry for posting here, I didn't now where to post it, could you please tell me, so next time I know the correct place.
--- End quote ---
Every (almost) subforum has a sticky topic at the top explaining the purpose of the subforum.
Have you enabled the full log when compiling?
If not enable it and compare the two logs (the one from C::B and the one from your console).
Then copy the commands from C::B and try to make them work.
After that you can tell us what is needed in order to make it work in C::B.
smallB:
@Obfuscated well, few issues:
1. My bad, in build options I've had -include "Promote.h.gch" instead of "Promote.h" - that was the cause of stray 216 error. This is sorted now.
2. In order to compile this I had to disable few switches - notably pedantic errors + few others. It compiles for me with just -Wall and -Wextra. That is sorted now.
3. Even though I have this file precompiled it is still being compiled every time I press f9. Why? The whole purpose of precompiling is to have it done once and for all. So this ISN'T sorted and I would ask you guys to help me with this.
Thanks.
Alpha:
--- Quote from: smallB on October 30, 2011, 02:14:20 pm ---3. Even though I have this file precompiled it is still being compiled every time I press f9. Why?
--- End quote ---
If the header was precompiled with different options than the rest of the project, gcc will not use it. Try a full rebuild.
smallB:
@Alpha thanks, will try.
Navigation
[0] Message Index
[*] Previous page
Go to full version