Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compile libjpeg with mingw

Tags:

mingw

libjpeg

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

like image 704
Maecky Avatar asked Oct 26 '12 13:10

Maecky


1 Answers

If for some reason you can not run

 $ autoheader

Add the following definition to the jconfig.h

 #define HAVE_PROTOTYPES 1
like image 177
pogorskiy Avatar answered Sep 30 '22 09:09

pogorskiy