Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3C8927B2.70E1E6E7@t-online.de> Date: Fri, 08 Mar 2002 22:05:54 +0100 From: M_D DOT Weiss AT t-online DOT de (Michaela und Daniel =?iso-8859-1?Q?Wei=DF?=) X-Mailer: Mozilla 4.73 [de]C-CCK-MCD DT (Win98; U) X-Accept-Language: de MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: cannot link with libtiff Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Sender: 510086811119-0001 AT t-dialin DOT net 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): 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. 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/