Need help compiling jpegtran.c code from libjpeg

前端 未结 1 1961
伪装坚强ぢ
伪装坚强ぢ 2020-12-22 11:13

See bottom for updates

I am running into a number of odd problems. For starters, I\'m using the latest Eclipse CDT and before implementing d

相关标签:
1条回答
  • 2020-12-22 11:32

    I had something similar happen when developing with MinGW a couple of years ago. I had to download the source for libjpeg and build it on my machine in order to get the libjpeg.a file. The source can be found here:

    http://www.ijg.org/

    The problem that I found when I built this library was that when I executed 'nm libjpeg.a' it became clear that the symbols in cdjpeg.h and transupp.h were not being compiled into the library. I couldn't find a way to do it via configure since I didn't see anything obvious when I did 'configure --help'. Instead I edited the Makefile.in file where it defines the am__objects_1 list of .lo files. I added cdjpeg and transupp at the end like this:

    am__objects_1 = jaricom.lo jcapimin.lo jcapistd.lo jcarith.lo \
        jccoefct.lo jccolor.lo jcdctmgr.lo jchuff.lo jcinit.lo \
        jcmainct.lo jcmarker.lo jcmaster.lo jcomapi.lo jcparam.lo \
        jcprepct.lo jcsample.lo jctrans.lo jdapimin.lo jdapistd.lo \
        jdarith.lo jdatadst.lo jdatasrc.lo jdcoefct.lo jdcolor.lo \
        jddctmgr.lo jdhuff.lo jdinput.lo jdmainct.lo jdmarker.lo \
        jdmaster.lo jdmerge.lo jdpostct.lo jdsample.lo jdtrans.lo \
        jerror.lo jfdctflt.lo jfdctfst.lo jfdctint.lo jidctflt.lo \
        jidctfst.lo jidctint.lo jquant1.lo jquant2.lo jutils.lo \
        jmemmgr.lo cdjpeg.lo transupp.lo @MEMORYMGR@.lo
    

    Then I did a 'make' and a 'make install' and the symbols were present in the library. At that point I was able to get your code to build. An autotools expert may be able to come up with a better way to do it but this will at least get you going.

    0 讨论(0)
提交回复
热议问题