Hi, I haven't found this problem in the mailing list archive:
I have been trying to use libtiff (tiff-3.5.7-1) in my program (using daily updated cygwin version). According to the announcement (Charles Wilson on Feb 10th): <BEGIN QUOTE> Now uses the auto-import functionality of newer binutils, and doesn't use __declspec(dllimport). This means you no longer need "-DTIFF_STATIC -DJPEG_STATIC -DZLIB_STATIC" or even -DALL_STATIC when compiling objects intended for static linking. Just compile as normal. (...) NO special flags at compile-time nor link-time when linking to dynamic links. <END QUOTE> So I have tried to compile my program with the line: gcc -Wall -O3 *.c and get this output: main.c: In function `main': main.c:8: warning: unused variable `d' main.c:25: warning: control reaches end of non-void function /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x31):im_tools.c: undefined reference to `TIFFOpen' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x54):im_tools.c: undefined reference to `TIFFSetField' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x72):im_tools.c: undefined reference to `TIFFSetField' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x88):im_tools.c: undefined reference to `TIFFSetField' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0xa0):im_tools.c: undefined reference to `TIFFSetField' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0xb6):im_tools.c: undefined reference to `TIFFSetField' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0xcc):im_tools.c: more undefined references to `TIFFSetField' follow /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x158):im_tools.c: undefined reference to `TIFFWriteScanline' /cygdrive/c/windows/TEMP/ccjdC8se.o(.text+0x16c):im_tools.c: undefined reference to `TIFFClose' collect2: ld returned 1 exit status Compiling with 'gcc -Wall -O3 -ltiff *.c' gives the same result, trying to link statically also. The auto import works for the math library, though, I don't need to put 'gcc -lm ...' How can I link with libtiff? Thanks for your help, Daniel -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/