TIFF and LibTiff Mail List Archive


2005.05.27 21:08 "[Tiff] creating a vb wrapper for libtiff", by Antoine
2005.06.03 17:10 "Re: [Tiff] vb port soon available", by Antoine
2005.06.03 17:36 "Re: [Tiff] vb port soon available", by Edward Lam

2005.06.03 17:36 "Re: [Tiff] vb port soon available", by Edward Lam

Hi Antoine,

What happens if the same #define if we want it to be different things for different libraries? Witness the problems we already have with the int8, int16, etc typedefs. That would be my reason making sure the defines have the word TIFF in them.

Does the __stdcall attribute need to be in between the return type and the function name? Ew. :) If that is the case, I wouldn't bother with some sort of DLL_API define as that's not needed right now anyhow.


I think that a better approach would have been to add something like TIFF_EXPORT in front of all the functions that we need to export. And then we can just have some options to control this #define in config.h.

On Windows for example, one can use this to do away with the need for a .def file by doing:

#define TIFF_EXPORT __declspec(dllexport)

This would allow everything to go into one baseline. I detect multiple baselines because what happens if a bug gets fixed in only 1 of them?

How would people feel about putting a (stolen ungraciously from freeimage):

#define DLL_CALLCONV __stdcall

(with some decision thing to make it optional)




#define DLL_API __declspec(dllexport)
#define DLL_API __declspec(dllimport)
#endif // FREEIMAGE_LIB || !WIN32

In tiffio.h and then

DLL_API return_type DLL_CALLCONV TIFF_Function_Name(params);

for all of the functions exported? Does that sound like a plan? I am going to work on a script to do it in any case, seeing as I need it. I will post the script when I have it done.