Strange characters present in gcc compilation output message on console

♀尐吖头ヾ 提交于 2020-01-14 09:33:13

问题


When I build a C code using gcc, Makefile as below on a Ubuntu 10.04-x32 bit system, under bash shell. The gcc output message has some unwanted characters in the output message(see below: â).

test@dualboot-desktop:~/test/opencv$ make
cc -L/usr/local/lib -I/usr/local/include/opencv2 -lopencv_imgproc -lopencv_highgui -lopencv_video -lopencv_calib3d test1.c -o test_opencv
test1.c: In function âmainâ:
test1.c:13: error: too few arguments to function âcvLoadImageâ
test1.c:21: error: expected â;â before âcvMoveWindowâ
make: *** [test_opencv] Error 1

They jumble up the actual message sometimes and get pesky.

What is the cause of that? Anything wrong in my user settings on ubunti

How can I fix that?


回答1:


If you set LC_LANG to something that ends in UTF8 but your terminal is having problems (or is not configured to handle) UTF8, then you run into trouble.

Either configure your terminal or set LC_LANG=en_GB.



来源:https://stackoverflow.com/questions/6537520/strange-characters-present-in-gcc-compilation-output-message-on-console

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!