User forums > Using Code::Blocks

‘=’, ‘,’, ‘;’, ‘

(1/2) > >>

DBS:
I use Code::blocks 10.05 on Win 7 Professional with gnu gcc cygwin 1.7.  Some errors are displayed like this: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before â€

I have fixed the code problem, but I am still unable to decode this message.  I have seen an earlier response to a similar question on this Forum, but it did not help to me.  What settings control the build messages encoding?

Many Thanks.

nightlight:
I am seeing the same problem. Did you manage to solve it?

oBFusCATed:
Have you checked your locale settings?
What is the output when you execute gcc/g++ from the command line/shell?

Jenna:
Don't forget cygwins locale settings, too.

nightlight:

--- Quote from: oBFusCATed on November 27, 2010, 12:47:55 am ---Have you checked your locale settings?
What is the output when you execute gcc/g++ from the command line/shell?

--- End quote ---

The problem is for utf8 coded characters (fancy unicode quotes around error messages) produced by cygwin gcc. The text inside the quotes is OK (regular us-en). I couldn't find the character encoding for build log (there is one only for input files into editor). Here is an example of a gcc message output:

C:\C\exp\cyg\main.c||In function ‘ticks2’:|
C:\C\exp\cyg\main.c|19|warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘time_t’|
C:\C\exp\cyg\main.c|19|warning: format ‘%X’ expects type ‘unsigned int’, but argument 3 has type ‘long int’|
C:\C\exp\cyg\main.c|19|warning: format ‘%X’ expects type ‘unsigned int’, but argument 2 has type ‘time_t’|
C:\C\exp\cyg\main.c|19|warning: format ‘%X’ expects type ‘unsigned int’, but argument 3 has type ‘long int’|
||=== Build finished: 0 errors, 4 warnings ===|

As you can see only the unicode quotes (in utf8) were not understood by the CB Build log display. Compiling from command line in cygwin shell produces correct output:

C:/C/exp/cyg/main.c: In function `ticks2':
C:/C/exp/cyg/main.c:19: warning: format `%X' expects type `unsigned int', but argument 2 has type `time_t'
C:/C/exp/cyg/main.c:19: warning: format `%X' expects type `unsigned int', but argument 3 has type `long int'
C:/C/exp/cyg/main.c:19: warning: format `%X' expects type `unsigned int', but argument 2 has type `time_t'
C:/C/exp/cyg/main.c:19: warning: format `%X' expects type `unsigned int', but argument 3 has type `long int'

Navigation

[0] Message Index

[#] Next page

Go to full version