编译常见错误

使用Intel编译器时,可能出现如下错误:

Catastrophic error: could not set locale "" to allow processing of multibyte characters 

定义环境变量即可

export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

或者在 C 编译器选项中增加 -no-multibyte-chars