Hi--
I need to do some work with abnormal TIFF images, so I figured the best way to do this was to use libtiff. So I installed fink ( been meaning to for a while, but never really needed it ) and installed libtiff, zlib, and libjpeg, all of which are needed to use libtiff.
Everything worked fine, no error messages, etc. The following snippet of code won't compile in ProjectBuilder, though, with these messages:
/usr/bin/ld: warning prebinding disabled because of undefined symbols
/usr/bin/ld: Undefined symbols:
_TIFFOpen
The header file ( tiffio.h) is being read, because it objects if the arguments to TIFFOpen() aren't correct. So it seems to me like the libraries to which tiffio.h refers ( /sw/lib/libtiff.a, I think ) aren't being linked correctly. I suspect I just have to insert a path into some configuration file variable, and everything will be fine. However, I have no idea what that is, so if any of you with more fink experience can explain it away, I will shower you with praise and finally be able to get to work.
Thanks so much,
Evan
The code:
#include <stdio.h>
#include "/sw/include/tiffio.h"
int main (int argc, const char * argv[]) {
TIFF* inFile;
printf("Hello, World! Attempting to open tiff file: %s\n\n", argv[1]);
inFile = TIFFOpen(argv[1], "r" );
fprintf( stderr, "%s opened successfully \n", argv[1]);
return 0;
}
