Author Topic: CodeBlocks and GCC: warning = error  (Read 16914 times)

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
CodeBlocks and GCC: warning = error
« on: November 04, 2008, 03:38:27 am »
Hello!
After installing CodeBlocks on Linux, when I compile some program with GCC - all warnings become errors. I think it's related to CodeBlocks (8.02 - my version) - because GCC itself (when outside from C::B) reacts on warnings in normal way. In build options I can see that "threat warnings as errors" is not selected - nothing unusual + it's a default project... BUG?
How to fix it? May be I should use most recent C::B from SVN?
P.S. Search is not helped me =(

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: CodeBlocks and GCC: warning = error
« Reply #1 on: November 04, 2008, 07:48:07 am »
Do you use a localized gcc/g++ ?

C::B uses regexes to parse output of compiler and decide whether it's a warning, an error or whatever and localized output will be treated wrong in many cases.
(By the way I had the same problems with gcc 4.3, if I remeber right).

Because of this problem I use the envvar-plugin to set "LC_ALL" to "en_US.UTF-8" ("Settings.. -> Environment -> Environment variables").

I don't want to change the regexes, what's also possible, but much more work and of course more error-prone. And it depends on the translation, that is available for your compiler.
"Settings -> Compiler and debugger... -> Global compiler settings... -> Other settings -> Advanced options... -> Output parsing"

Offline tuXXX

  • Multiple posting newcomer
  • *
  • Posts: 13
Re: CodeBlocks and GCC: warning = error
« Reply #2 on: November 04, 2008, 05:25:49 pm »
Yes, I using localized russian version of GCC in Ubuntu 8.10 :)
Thanks, I'll try this. :)