[Gdal-dev] Linking Code That Uses MITAB with the GDAL .lib file

Frank Warmerdam warmerdam at pobox.com
Thu Oct 6 10:13:21 EDT 2005


On 10/6/05, Bob Cave <rlcave3rd at yahoo.com> wrote:
> I have a project that currently uses MITAB to read
> MapInfo files.  I need to add some GDAL functionality
> to this program.  Given that GDAL contains MITAB, I
> expected that I could replace my linker reference to
> the MITAB libs with the GDAL lib and relink.  This
> does not work.  I get a number of unresolved
> references for the TABxxx classes in MITAB.  (All of
> the OGRxxx and
> other support classes get resolved as expected.)
>
> I have built GDAL to include all of the OGR formats.
> Is there something I need to change in the nmake.opts
> file to get the TABxxx classes exported in the GDAL
> lib file?

Bob,

Looking at mitab.h, it does not seem that Daniel marked the
MITAB custom classes for export from the DLL.  It might be
sufficient to change your local copy of mitab.h to declare
some (all?) of the classes for export.

For example change:
class IMapInfoFile : public OGRLayer

to:
class CPL_DLL IMapInfoFile : public OGRLayer

If this resolves the problem, then you might want to submit a
bug against MITAB suggesting that this be incorporated back
into the core.

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