Compile libjpeg with mingw

2019-02-07 07:43发布

I finally setup mingw and msys and now I want to compile libjpeg. I downloaded the latest libjpeg sources from the projekt page (jpeg-8d) and extracted the files.

Then I ran the configure command like this:

./configure --build=x86_64-w64-mingw32 --prefix=/D/Libraries/bin/jpegd-8d

after that i wanted to do a build with make but I get the following error:

$ make 
make  all-am
make[1]: Entering directory `/D/Libraries/sources/jpeg-8d'
CC    jaricom.lo
CC    jcapimin.lo
jcapimin.c:127:1: error: conflicting types for 'jpeg_suppress_tables'
jcapimin.c:128:1: note: an argument type that has a default promotion can't match an empty parameter name list declaration
In file included from jcapimin.c:22:0:
jpeglib.h:982:14: note: previous declaration of 'jpeg_suppress_tables' was here
make[1]: *** [jcapimin.lo] Error 1
make[1]: Leaving directory `/D/Libraries/sources/jpeg-8d'
make: *** [all] Error 2

I saw this post here, where a guy has the same problem as me: libjpeg: compile error

It was suggested to run the "autoheader" command. I tried to do this, but I got the following error:

    sh: autoheader:command not found

I google for autoheader and mingw / msys but I couldn't find an answer.

So my question is: Is there another solution to get this compiled? If not, how can I install the needed tools in msys / mingw64?

Regards

标签: mingw libjpeg
2条回答
趁早两清
2楼-- · 2019-02-07 08:20

Follow the install.txt advice to manually compile ckconfig.c and have it generate a jconfig.h for you, then proceed to make, and make install.

查看更多
Luminary・发光体
3楼-- · 2019-02-07 08:41

If for some reason you can not run

 $ autoheader

Add the following definition to the jconfig.h

 #define HAVE_PROTOTYPES 1
查看更多
登录 后发表回答