I get source from libtiff 3.8.2 from gnuwin32 but cannot get the libtiff3.dll.
First I edit the Makefile.mingw to enable ZIP and JPEG compression (from the tiff-3.8.2 directory). Then I launch a "make -f makefile.mingw" to prepare the makefile in all subdir. After I launch make.
And it failed to compile the tool bmp2tiff.exe complaining about missing:
gcc.exe: ../libtiff/.libs/libtiff.dll.a: No such file or directory
I detect that libtiff.def were not made in .libs.
The command line shown is:
I finally find where is the problem. In sources distributed on GnuWin32 web site there is a Makefile.mingw which set a DLLFLAG variable to "-DBUILD_LIBTIFF_DLL". Unfortunately it is not use in the configure setting.
A quick and dirty solution is to add these flag in the libtool file (in the same directory as Makefile.mingw) in the variable pic_flag -in addition to -DDLL_EXPORT -DPIC
Now it is known. If it could be integrated nicely in the Makefile and /or configure, it would be nice.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I get source from libtiff 3.8.2 from gnuwin32 but cannot get the libtiff3.dll.
First I edit the Makefile.mingw to enable ZIP and JPEG compression (from the tiff-3.8.2 directory). Then I launch a "make -f makefile.mingw" to prepare the makefile in all subdir. After I launch make.
And it failed to compile the tool bmp2tiff.exe complaining about missing:
gcc.exe: ../libtiff/.libs/libtiff.dll.a: No such file or directory
I detect that libtiff.def were not made in .libs.
The command line shown is:
dlltool.exe --output-def=libtiff.def tif_aux.o tif_close.o tif_codec.o tif_color.o tif_compress.o tif_dir.o tif_dirinfo.o tif_dirread.o tif_dirwrite.o tif_dumpmode.o tif_error.o tif_extension.o tif_fax3.o tif_fax3sm.o tif_flush.o tif_getimage.o tif_jpeg.o tif_luv.o tif_lzw.o tif_next.o tif_ojpeg.o tif_open.o tif_packbits.o tif_pixarlog.o tif_predict.o tif_print.o tif_read.o tif_strip.o tif_swab.o tif_thunder.o tif_tile.o tif_unix.o tif_version.o tif_warning.o tif_write.o tif_zip.o libtiff-dllversion.o libtiff-dll-res.o
If I launch this manually, libtiff.def is done but it seems to be empty:
; c:\mingw\bin\dlltool.exe --output-def=libtiff.def tif_aux.o tif_close.o tif_codec.o tif_color.o tif_compress.o tif_dir.o tif_dirinfo.o tif_dirread.o tif_dirwrite.o tif_dumpmode.o tif_error.o tif_extension.o tif_fax3.o tif_fax3sm.o tif_flush.o tif_getimage.o tif_jpeg.o tif_luv.o tif_lzw.o tif_next.o tif_ojpeg.o tif_open.o tif_packbits.o tif_pixarlog.o tif_predict.o tif_print.o tif_read.o tif_strip.o tif_swab.o tif_thunder.o tif_tile.o tif_unix.o tif_version.o tif_warning.o tif_write.o tif_zip.o libtiff-dllversion.o libtiff-dll-res.o
EXPORTS
DllGetVersion @ 1 ;
Then I can launch command:
gcc.exe -Wl,--out-implib=libtiff.dll.a -Wl,-s -Wl,-e,_DllMainCRTStartup@12 -shared -Wl,-s -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -Wl,--add-stdcall-alias -Wl,--enable-auto-image-base -Wl,--major-image-version=1 -Wl,--minor-image-version=0 -o libtiff3.dll -Wl,--whole-archive tif_aux.o tif_close.o tif_codec.o tif_color.o tif_compress.o tif_dir.o tif_dirinfo.o tif_dirread.o tif_dirwrite.o tif_dumpmode.o tif_error.o tif_extension.o tif_fax3.o tif_fax3sm.o tif_flush.o tif_getimage.o tif_jpeg.o tif_luv.o tif_lzw.o tif_next.o tif_ojpeg.o tif_open.o tif_packbits.o tif_pixarlog.o tif_predict.o tif_print.o tif_read.o tif_strip.o tif_swab.o tif_thunder.o tif_tile.o tif_unix.o tif_version.o tif_warning.o tif_write.o tif_zip.o libtiff-dllversion.o libtiff-dll-res.o -Wl,--no-whole-archive -Wl,--no-whole-archive -Wl,--major-image-version=3 -Wl,--minor-image-version=8 -L/c/progra~1/GnuWin32/lib -L/c/progra~1/GnuWin32/lib -L/c/progra~1/GnuWin32/lib -Lc:/Progra~1/GnuWin32/lib -lgw32c -liberty -lintl -liconv -lwsock32 -lole32 -luuid -lmsvcp60 -ljpeg -lz -Wl,--exclude-libs=ALL libtiff.def
But It complain about a lot of missing reference:
Creating library file: libtiff.dll.a
tif_aux.o(.text+0x60): In function
TIFFCheckMalloc': c:/Program Files/GnuWin32/src/tiff/3.8.2/tiff-3.8.2/libtiff/../../tiff-3.8.2-src/libtiff/tif_aux.c:49: undefined reference to_imp__TIFFErrorExt'tif_aux.o(.text+0x6f):c:/Program Files/GnuWin32/src/tiff/3.8.2/tiff-3.8.2/libtiff/../../tiff-3.8.2-src/libtiff/tif_aux.c:46: undefined reference to `_imp___TIFFmalloc'
...
I simply compare with what happen in libjpeg at this point. Here are the command line used:
dlltool.exe --export-all-symbols --output-def=jpeg.def jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o jpeg-dllversion.o
And
gcc.exe -Wl,--out-implib=libjpeg.dll.a -Wl,--export-all-symbols -Wl,-s -Wl,-e,_DllMainCRTStartup@12 -shared -Wl,-s -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-stdcall-fixup -Wl,--add-stdcall-alias -Wl,--enable-auto-image-base -Wl,--major-image-version=6 -Wl,--minor-image-version=2 -o jpeg62.dll -Wl,--whole-archive jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o jfdctint.o jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o jcomapi.o jutils.o jerror.o jmemmgr.o jmemnobs.o jpeg-dllversion.o -Wl,--no-whole-archive -Wl,--no-whole-archive -Lc:/Progra~1/GnuWin32/lib -lgw32c -liberty -lintl -liconv -lwsock32 -lole32 -luuid -lmsvcp60 -Wl,--exclude-libs=ALL jpeg.def
The main difference I see is in the parameter --export-all-symbols. And the jpeg.def contains much more infos.
If somebody can help me.
Thanks in advance
Hi,
I finally find where is the problem. In sources distributed on GnuWin32 web site there is a Makefile.mingw which set a DLLFLAG variable to "-DBUILD_LIBTIFF_DLL". Unfortunately it is not use in the configure setting.
A quick and dirty solution is to add these flag in the libtool file (in the same directory as Makefile.mingw) in the variable pic_flag -in addition to -DDLL_EXPORT -DPIC
Now it is known. If it could be integrated nicely in the Makefile and /or configure, it would be nice.
Thanks