ubuntu 下交叉编译cgic205

1:解压

   tar zxvf   cgic205.tar.gz

2:修改编译器

   cd cgic205

   修改如下:

ubuntu 下交叉编译cgic205_第1张图片


注意:要将所有的gcc的地方改成arm-linux-gcc ,不然容易出现以下的错误提示


arm-linux-gcc -g -Wall   -c -o cgic.o cgic.c
rm -f libcgic.a
arm-linux-ar rc libcgic.a cgic.o
arm-linux-ranlib libcgic.a
arm-linux-gcc -g -Wall   -c -o cgictest.o cgictest.c
gcc cgictest.o -o cgictest.cgi -L./ -lcgic
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
/usr/bin/ld: cgictest.o: Relocations in generic ELF (EM: 40)
cgictest.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [cgictest.cgi] 错误 1

3:make  

你可能感兴趣的:(ubuntu,gcc,File,编译器)