现在的位置: 首页 > 综合 > 正文

ubuntu 下交叉编译cgic205

2013年07月20日 ⁄ 综合 ⁄ 共 763字 ⁄ 字号 评论关闭

1:解压

   tar zxvf   cgic205.tar.gz

2:修改编译器

   cd cgic205

   修改如下:

注意:要将所有的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  

抱歉!评论已关闭.