[gdal-dev] Newbie Developer Question About Linking
Frank Warmerdam
warmerdam at pobox.com
Fri Sep 5 15:27:23 EDT 2008
Joel Odom wrote:
> I'm new to GDAL, though I'm looking forward to using it. I've compiled
> 1.5.2 under Microsoft Visual Studio 2008 and am trying to experiment
> with the library. In my application that links to the library I'm
> getting an unresolved reference (pasted below). I don't have any ODBC
> experience and would appreciate any advice as to how I can resolve this
> reference (and some other ODBC unresolved externals that come after
> this) so I can compile and use OGR. Thanks much for any help.
>
>
>
> Error 3 error LNK2019: unresolved external symbol _SQLInstallerError at 20
> referenced in function "public: int __thiscall
> CPLODBCDriverInstaller::InstallDriver(char const *,char const *,unsigned
> short)" (?InstallDriver at CPLODBCDriverInstaller@@QAEHPBD0G at Z) gdal.lib
Joel,
If you link against gdal_i.lib (the dll stub library) the above should
not be an issue. But if you want to link against the static library
(gdal.lib), then you need to also pull in any supporting libraries.
From nmake.opt, for ODBC you need:
!IFDEF ODBC_SUPPORTED
ODBCLIB = odbc32.lib odbccp32.lib user32.lib
!ENDIF
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