Compile libjpeg with mingw

Finally, I install 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 as follows:

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

after that I wanted to 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 the guy has the same problem as me: libjpeg: compilation 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 could not find the answer.

So my question is: is there any other solution for compiling? If not, how can I install the necessary tools in msys / mingw64?

Hi

+4
source share
2 answers

If for some reason you cannot run

  $ autoheader 

Add the following definition to jconfig.h

  #define HAVE_PROTOTYPES 1 
+7
source

Follow the instructions of install.txt to manually compile ckconfig.c and create the jconfig.h file for it, then proceed with the creation and installation.

+3
source

Source: https://habr.com/ru/post/1415363/


All Articles