Author Topic: translate compil Messages  (Read 3244 times)

Offline Migou95

  • Single posting newcomer
  • *
  • Posts: 2
translate compil Messages
« on: February 05, 2013, 06:29:49 pm »
I am on Ubuntu 12.04.1 and i installed Code::blocks 12.11.
When i complie, iget tri languages messages

"/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|26|attention : Format »%d« erwartet Argumenttyp »int«, aber Argument 2 hat Typ »char *« [-Wformat]|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|33|attention : Format »%d« erwartet Argumenttyp »int«, aber Argument 2 hat Typ »char *« [-Wformat]|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|9|attention : Variable »Id« wird nicht verwendet [-Wunused-variable]|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|7|attention : Variable »Rslt« gesetzt, aber nicht verwendet [-Wunused-but-set-variable]|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|82|attention : contrôle a atteint la fin non void de la fonction [-Wreturn-type]|
obj/Debug/main.o||In function `main':|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|66|undefined reference to `Lire_Mag'|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|70|undefined reference to `Lister_Prod'|
/home/michel/atelier/Prog-C/Pdb_en_Texte/SpshCommissions/main.c|78|undefined reference to `Editer_Prod'|
||=== Génération terminée : 8 errors, 0 warnings (0 minutes, 0 seconds) ===|"


How can i get only one language?  - French will be best for me

Thanks

Offline jarod42

  • Multiple posting newcomer
  • *
  • Posts: 87
Re: translate compil Messages
« Reply #1 on: February 05, 2013, 08:44:54 pm »
As C::B uses regex to find which message is an error/warning, it is best to set language to english.

See answer for http://stackoverflow.com/questions/869309/selecting-message-language-in-gcc-and-g.
Set the global variable inside C::B.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: translate compil Messages
« Reply #2 on: February 05, 2013, 09:11:12 pm »
To get just english compiler output you can use the envvar-plugin to set "LC_ALL" to "C" ("Settings... -> Environment -> Environment variables").
The plugin is part of the contrib-plugins, so you need the appropriate packages installed in ubuntu.

Offline Migou95

  • Single posting newcomer
  • *
  • Posts: 2
Re: translate compil Messages
« Reply #3 on: February 06, 2013, 03:19:06 pm »
Thanks, it's working well now