AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2003.05.21 21:24 "Win32 libtiff calling convention", by Khouri Giordano
2003.05.22 07:43 "Re: Win32 libtiff calling convention", by Andrey Kiselev
2003.06.26 21:08 "Bug located in Sam Leffler's thumbnail.c", by Robert S. Kissel
2003.06.27 20:00 "Re: Bug located in Sam Leffler's thumbnail.c", by Andrey Kiselev
2003.07.11 19:22 "grey scale conversion", by cthomas
2003.07.11 23:29 "Re: grey scale conversion", by Scott Weber

2003.05.21 21:24 "Win32 libtiff calling convention", by Khouri Giordano

I'm new to the list so forgive me if this has come up before.

Problem definition:

This only applies to win32 builds of libtiff. I am working with version 3.6.0-beta.

Since the makefile.vc doesn't define any calling convention, cdecl is used as a default. I prefer stddecl and use it as the default when building my projects. When I link to libtiff, the linker can't match up any of the TIFFXxx functions because the library and the application where built using two different calling conventions.

Solution:

To tiffio.h I added a TIFFDECL define to explicitly use cdecl for win32 builds. I used TIFFDECL in every function pointer typedef and function prototype.

I would like to submit this to the libtiff project so everyone else can have it, but have no idea how to go about this.

--

Khouri Giordano
Software Technology Researcher

Nikon Electronic Imaging | http://www.nikonusa.com/

kgiordano@nikondev.com