这与编译libjpeg v6b有关。如果相关的话。
我运行./configure --prefix = / c / tmp / jpeg-6b-build --enable-shared --enable-static就像安装doc说的那样,但是libtool没有它。
checking dynamic linker characteristics... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
我想我需要这个共享库才能编译一些函数。 libjpeg本身编译得很好,而.exe它会生成工作但我需要使用其他东西。 v6b在某些情况下不会生成.DLL而v9会这样做。
./configure命令的完整输出:
ild
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking how to run the C preprocessor... gcc -E
checking for function prototypes... yes
checking for stddef.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for size_t... yes
checking for type unsigned char... yes
checking for type unsigned short... yes
checking for type void... yes
checking for working const... yes
checking for inline... __inline__
checking for broken incomplete types... ok
checking for short external names... ok
checking to see if char is signed... yes
checking to see if right shift is signed... yes
checking to see if fopen accepts b spec... yes
checking for a BSD compatible install... /bin/install -c
checking for ranlib... ranlib
checking host system type... i386-pc-mingw32
checking for ranlib... ranlib
checking for gcc... gcc
checking whether we are using GNU C... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... no
checking if gcc static flag -static works... -static
checking whether ln -s works... no
checking for ld used by GCC... ./c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../
../mingw32/bin/ld.exe
checking if the linker (./c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../ming
w32/bin/ld.exe) is GNU ld... yes
checking whether the linker (./c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../..
/mingw32/bin/ld.exe) supports shared libraries... yes
checking for BSD-compatible nm... /mingw/bin/nm
checking command to parse /mingw/bin/nm output... no
checking how to hardcode library paths into programs... immediate
checking for ./c:/mingw/bin/../lib/gcc/mingw32/4.7.2/../../../../mingw32/bin/ld.
exe option to reload object files... -r
checking dynamic linker characteristics... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
checking libjpeg version number... 62
creating ./config.status
creating Makefile
creating jconfig.h
jconfig.h is unchanged
答案 0 :(得分:2)
我遇到了同样的问题,我相信这是因为jpeg-6b是使用非常旧版本的autotools构建的(如果sourceforge页面正确的话,jpeg-6b版本可以追溯到1998年。)
特别是,问题是它检查gcc是否支持-fPIC标志的方式:
checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... no
这就是他们从config.log执行检查的方式:
ltconfig:547: checking if gcc PIC flag -fPIC works ltconfig:548: gcc -c -fPIC -DPIC -I/local/include conftest.c 1>&5 conftest.c:1:0: warning: -fPIC ignored for target (all code is position independent) ^
注意gcc如何返回警告,它可能返回退出代码1,这使得检查失败。并且位置无关的代码对于共享库是必需的,因此这使得它认为它无法生成它们,并且它后来输出:
checking whether to build shared libraries... no
将它与libjpeg9进行比较,我假设它使用了更新的autotools版本:
checking for gcc -std=gnu99 option to produce PIC... -DDLL_EXPORT -DPIC checking if gcc -std=gnu99 PIC flag -DDLL_EXPORT -DPIC works... yes
来自config.log:
configure:10108: checking for gcc -std=gnu99 option to produce PIC configure:10115: result: -DDLL_EXPORT -DPIC configure:10123: checking if gcc -std=gnu99 PIC flag -DDLL_EXPORT -DPIC works configure:10141: gcc -std=gnu99 -c -g -O2 -I/local/include -DDLL_EXPORT -DPIC -DPIC conftest.c >&5 configure:10145: $? = 0 configure:10158: result: yes
我最终编译了libjpeg9,但我认为如果你可以使用更新版本的autotools重新创建./configure脚本,libjpeg6也可以编译。
答案 1 :(得分:1)
您应该尝试运行
./configure --help
并查看所有可用的配置标志,也许您拼错了一些,或者您需要--enable-dynamic
或其他不同的东西。
对于配置输出,您还可以参考config.log
,即configure
文件旁边的项目(在您的情况下为libjpeg' s)目录