Eni*_*gma 5 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 libraries... no
checking whether to build static libraries... yes
Run Code Online (Sandbox Code Playgroud)
我想我需要这个共享库来编译一些功能。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
Run Code Online (Sandbox Code Playgroud)
我遇到了同样的问题,我相信这是因为 jpeg-6b 是使用非常旧版本的 autotools 构建的(如果 sourceforge 页面正确的话,jpeg-6b 版本可以追溯到 1998 年)。
特别是,问题在于它检查 gcc 是否支持 -fPIC 标志的方式:
检查 gcc 选项以生成 PIC... -fPIC 检查 gcc PIC 标志 -fPIC 是否有效...否
这就是他们从 config.log 执行检查的方式:
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,这使得检查失败。与位置无关的代码对于共享库是必需的,因此这使得它认为无法创建它们,并且稍后输出:
检查是否构建共享库...否
与 libjpeg9 进行比较,我认为它使用更新版本的 autotools:
检查 gcc -std=gnu99 选项以生成 PIC... -DDLL_EXPORT -DPIC 检查 gcc -std=gnu99 PIC 标志 -DDLL_EXPORT -DPIC 是否有效...是
并从 config.log 中:
配置:10108:检查 gcc -std=gnu99 选项以生成 PIC 配置:10115:结果:-DDLL_EXPORT -DPIC 配置:10123:检查 gcc -std=gnu99 PIC 标志 -DDLL_EXPORT -DPIC 是否有效 配置:10141:gcc -std=gnu99 -c -g -O2 -I/local/include -DDLL_EXPORT -DPIC -DPIC conftest.c >&5 配置:10145:$?= 0 配置:10158:结果:是
我最终编译了 libjpeg9,但我认为如果您可以使用较新版本的 autotools 重新创建 ./configure 脚本,libjpeg6 也可能是可以编译的。
| 归档时间: |
|
| 查看次数: |
3734 次 |
| 最近记录: |