Dll 配置未启用make以生成共享库的脚本

Dll 配置未启用make以生成共享库的脚本,dll,linker,shared-libraries,static-libraries,libjpeg,Dll,Linker,Shared Libraries,Static Libraries,Libjpeg,这与编译libjpeg v6b有关(如果相关) 我运行./configure--prefix=/c/tmp/jpeg-6b-build--enable shared--enable static,如安装文档所述,但libtool没有 checking dynamic linker characteristics... no checking if libtool supports shared libraries... no checking whether to build shared li

这与编译libjpeg v6b有关(如果相关)

我运行./configure--prefix=/c/tmp/jpeg-6b-build--enable shared--enable static,如安装文档所述,但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生成.DLL

./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

相关问题:

您可能应该尝试运行

./configure --help
并查看所有可用的配置标志,可能您拼错了某些标志,或者您需要启用动态标志或其他标志


对于配置输出,您还可以参考
config.log
,它位于项目(在您的例子中是libjpeg)目录中,紧挨着
configure
文件。

我遇到了同样的问题,我相信这是因为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 检查gcc选项以生成PIC…-fPIC 正在检查gcc PIC标志-fPIC是否工作…否 这就是他们从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) ^ 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 ltconfig:547:检查gcc PIC标志-fPIC是否工作 ltconfig:548:gcc-c-fPIC-DPIC-I/local/include conftest.c 1>&5 conftest.c:1:0:警告:-目标忽略fPIC(所有代码与位置无关) ^ 请注意gcc如何返回警告,它可能返回退出代码1,这会导致检查失败。而位置独立代码对于共享库是必需的,因此这会使它认为它无法生成它们,并且它稍后会输出:

checking whether to build shared libraries... no 正在检查是否生成共享库…否 与libjpeg9相比,我认为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 检查gcc-std=gnu99选项以生成PIC…-DDLL_导出-DPIC 检查gcc-std=gnu99 PIC标志-DDLL_导出-DPIC是否工作…是 并从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) ^ 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 配置:10108:检查gcc-std=gnu99选项以生成PIC 配置:10115:结果:-DDLL_导出-DPIC 配置:10123:检查gcc-std=gnu99 PIC标志-DDLL_导出-DPIC是否工作 配置:10141:gcc-std=gnu99-c-g-O2-I/local/include-DDLL_EXPORT-DPIC-DPIC conftest.c>&5 配置:10145:$?=0 配置:10158:结果:是 我最终编译了libjpeg 9,但我认为如果可以使用较新版本的autotools重新创建./configure脚本,libjpeg 6也可以编译