Tag Archives: ubuntu related

A solution to the problem of “straight ‘\ 357’ in program” when compiling GCC

Link: http://blog.chinaunix.net/uid-23089249-id-61541.html

I took a few header files from my colleagues. It’s OK to compile them with GCC, but there are a lot of them when I compile them with arm linux GCC!

SerialPort.h:1: error: stray ‘\357’ in program

SerialPort.h:1: error: stray ‘\273’ in program

SerialPort.h:1: error: stray ‘\277’ in program

After looking at these errors, I found that some characters in the file are not supported by the compiler. If you look for these characters one by one, it will take a long time! The simplest solution:

Put the files in the windows system, open these files with Notepad, and then save them as. The code is Asni, and then compile them with the compiler under Linux. Generally, they can pass!

Experience:

The first time: unknown;

Second time: when compiling QT program, prompt this error; solve it according to the above method.

Solution to stray’\357′ in program when gcc is compiled

Link: http://blog.chinaunix.net/uid-23089249-id-61541.html

I got a few header files from my colleagues. It’s ok to compile with GCC, but a whole bunch of them came up when I compiled with ARM-Linux-gcc!

SerialPort.h:1: error: stray ‘\357’ in program

SerialPort.h:1: error: stray ‘\273’ in program

SerialPort.h:1: error: stray ‘\277’ in program

Look at these errors confused, after looking up the Internet, found that some characters in the file compiler does not support. If you look for these characters one by one, you’ll probably be looking for a long time! The simplest solution:
Put the files into The Windows system, use “Notepad” to open these files, and then “save as”, choose the code ASNI, and then under Linux to re-compile with the compiler, generally can pass!

Experience:

The first time: unknown;

Second time: when compiling QT program, prompt this error; According to the above method solved.