用mingw编译libjpeg [英] Compile libjpeg with mingw
问题描述
我终于设置了mingw和msys,现在我想编译libjpeg.我从projekt页面(jpeg-8d)下载了最新的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.
然后我像这样运行configure命令:
Then I ran the configure command like this:
./configure --build=x86_64-w64-mingw32 --prefix=/D/Libraries/bin/jpegd-8d
之后,我想使用make进行构建,但是出现以下错误:
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
我在这里看到了这篇文章,那里的一个人和我有同样的问题: libjpeg:编译错误
I saw this post here, where a guy has the same problem as me: libjpeg: compile error
建议运行"autoheader"命令.我尝试这样做,但是出现以下错误:
It was suggested to run the "autoheader" command. I tried to do this, but I got the following error:
sh: autoheader:command not found
我用google搜索了autoheader和mingw/msys,但找不到答案.
I google for autoheader and mingw / msys but I couldn't find an answer.
所以我的问题是:是否有另一种解决方案来进行编译? 如果没有,如何在msys/mingw64中安装所需的工具?
So my question is: Is there another solution to get this compiled? If not, how can I install the needed tools in msys / mingw64?
致谢
推荐答案
如果由于某些原因您无法运行
If for some reason you can not run
$ autoheader
将以下定义添加到jconfig.h
Add the following definition to the jconfig.h
#define HAVE_PROTOTYPES 1
这篇关于用mingw编译libjpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!