zoukankan      html  css  js  c++  java
  • 交叉编译jpeglib遇到的问题

    由于要在开发板中加载libjpeg,不能使用gcc编译的库文件给以使用,需要自己配置使用另外的编译器编译该库文件。

    /usr/bin/ld: .libs/jaricom.o: Relocations in generic ELF (EM: 40) 
    /usr/bin/ld: .libs/jaricom.o: Relocations in generic ELF (EM: 40) 
    .libs/jaricom.o: could not read symbols: File in wrong format 
    collect2: ld returned 1 exit status 
    make[1]: *** [libjpeg.la] Error 1 
    make[1]: Leaving directory `/home/wangqi/jpeg-9' 
    make: *** [all] Error 2 
    解决办法是./configure 的时候要配置好: 
    ./configure CC=arm-fsl-linux-gnueabi-gcc LD=arm-fsl-linux-gnueabi-ld --prefix=~/lib-jpeg/ --exec-prefix=~/lib-jpeg/ --enable-shared --enable-static --host=arm-fsl-linux-gnueabi 
    CC是编译器 
    LD要配置 
    --host最好设成CC和LD中除了-gcc和-ld的前面部分,如arm-fsl-linux-gnueabi,因为生产的makefile中就可以自动添加arm-fsl-linux-gnueabi-ramlib之类的,省去自己手头设置。 
    最后make的时候就不是用/usr/bin/ld了,就可以通过编译。

    转载自http://www.itnose.net/detail/930743.html下一个回答

    少壮不识cpp,老大方知cpp可怕
  • 相关阅读:
    bzoj2438
    bzoj3040
    [AHOI2009]维护序列
    [JSOI2008]最大数
    洛谷3378堆模板
    洛谷1439
    洛谷2756
    bzoj1016
    洛谷1875
    [模板] 强连通分量
  • 原文地址:https://www.cnblogs.com/Jacket-K/p/7341158.html
Copyright © 2011-2022 走看看