Trying to compile downloading .c files
(1) Files are compiled in order using cc
cc -Wall -Wextra -Wunreachable-code -ggdb -O0 *.c
(2) Then I need to make a static library from the final output in order to use it in a C ++ program. So I:
ar cru liborientdb-c.a *.o
(3) It works fine. However, when I come to compile C ++, the testme.cpp program, which includes the library in line # 1
(line 1 of testme.cpp)
Compile the step:
cc testme.cpp
I get this error:
liborientdb-c.a:117:22: error: stray '\3' in program
liborientdb-c.a:117:263: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\17' in program
liborientdb-c.a:117:265: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:283: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\22' in program
liborientdb-c.a:117:287: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\1' in program
liborientdb-c.a:117:289: warning: null character(s) ignored [enabled by default]
liborientdb-c.a:117:22: error: stray '\362' in program
....
So, following the advice on other publications here , I believe that errors can be caused by corrupted encoding.
, 'od -c' , " " . .o "od -c" , , .
EG.
0000000 177 E L F 002 001 001 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000020 001 \0 > \0 001 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0000040 \0 \0 \0 \0 \0 \0 \0 \0 ` ( \0 \0 \0 \0 \0 \0
0000060 \0 \0 \0 \0 @ \0 \0 \0 \0 \0 @ \0 026 \0 023 \0
0000100 U H 211 ? H 203 ? 020 H 211 } ? H 211 u ?
0000120 H 213 E ? H 213 \0 H 213 @ \b H 205 ? t 023
0000140 H 213 E ? H 213 \0 H 213 @ \b H 211 ? ? \0
? lib
recode UTF8..ISO-8859-15 *.c
: ( ). , .c , UTF-8, , -, ASCII. , , .
.o - .
???