5

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

Community
  • 1
  • 1
Maecky
  • 1,988
  • 2
  • 27
  • 41

2 Answers2

7

If for some reason you can not run

 $ autoheader

Add the following definition to the jconfig.h

 #define HAVE_PROTOTYPES 1
pogorskiy
  • 4,705
  • 1
  • 22
  • 21
  • -1 The advice for updating the jconfig.h file to #define HAVE_PROTOTYPES 1 is only a band-aid solution for a deeper problem: jconfig.h is corrupted and has incorrect #undef for many important items your compiler supports. – Martin Mar 14 '13 at 00:41
3

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.

Martin
  • 5,945
  • 7
  • 50
  • 77