[Gdal-dev] Use TIFF functions embedded in gdal win32 DLL
Frank Warmerdam
warmerdam at pobox.com
Fri Jul 16 09:43:07 EDT 2004
Julien Demaria wrote:
> Hi,
>
> I use libtiff (and also GeoTIFF) functions embedded in gdal shared library.
> It works well on Unix/Linux, but on Win32 platform the TIFF functions
> aren't exported (with CPL_DLL).
> I understand that all libtiff functions aren't supposed to be exported,
> because they are (supposed) only used internally for the TIFF GDAL
> driver, and aren't in the GDAL API... (but this will be useful for me :-).
> On the other hand, there are others functions (not in the API) used
> internally which are exported in the DLL, as HFAOpen, all png_xx
> functions, ... (maybe because some embedded libraries for some drivers
> export automatically their functions...)
>
> Is it an easy solution for me to export libtiff functions in the GDAL DLL ?
> The only solution I see is modify my local GDAL sources and add the
> CPL_DLL macro for each TIFF function I use...
Julien,
It is possible to add lots of CPL_DLL declarations but that can be quite an
effort. Instead, I would encourage you to build libtiff and libgeotiff
seperately and use those for GDAL and your own purposes. When built free
standing libtiff and libgeotiff do export their entry points properly. I
think libtiff uses a .def file and libgeotiff uses CPL_DLL (really
_declspec(dllexport)) declarations for the functions.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list