osx - libtiff for C using Snow Leopard. Storage size of TIFF isn't know -


i have built , installed tiff-4.0.0beta6 on mac computer running snow leopard. followed tutorial @ http://www.kyngchaos.com/macosx/build/libtiff. install went fine there issues tiff data type.

for exmaple, when compile following simple code:

#include "tiffio.h"  main() {     tiff* tif = tiffopen("foo.tif", "r");     tiffclose(tif); } 

i error message:

hlrg-labs-imac:metrics ben$ gcc main.c undefined symbols:   "_tiffopen", referenced from:       _main in cciewewr.o   "_tiffclose", referenced from:       _main in cciewewr.o ld: symbol(s) not found collect2: ld returned 1 exit status 

when compile code:

#include "tiffio.h"  main() {     tiff tif; } 

i compilation error:

hlrg-labs-imac:metrics ben$ gcc main.c main.c: in function ‘main’: main.c:5: error: storage size of ‘tif’ isn’t known 

any suggestions on appreciated.

thanks.

when compile need include -ltiff switch. example:

gcc main.c -ltiff -o main 

also, in second example should be

main(){ tiff* tif; } 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -