[Gdal-dev] trouble on compiling and using ogr with Oracle Spatial

Frank Warmerdam warmerdam at pobox.com
Tue Dec 19 20:50:48 EST 2006


Francesco Sozzi wrote:
> Hi All,
>  
> I'm trying to compile ogr with Oracle Spatial.
> I changed nmake.opt with the following:
>  
> # Add ORACLE support.
> ORACLE_HOME = D:\oracle\ora92
> 
> !IFDEF ORACLE_HOME
> OCI_LIB = $(ORACLE_HOME)\oci\lib\msvc\ociw32.lib \
> $(ORACLE_HOME)\oci\lib\msvc\oci.lib
> !ENDIF
> 
> ORACLE_HOME path is correct.
> 
> Then I compiled and I got binaries (such as ogr2ogr.exe).
> 
> But if I try to issue a test as
> 
> ogr2ogr -f OCI OCI:scott/tiger at franz C:\App\TI-CantoneSHP\comuni.shp
> 
> I get the error "Unable to find driver 'OCI'"

Francesco,

After changing the nmake.opt file, you need to do a "nmake /f makefile.vc
clean" before doing the build again.  Is it possible you missed this step?
By the way, "ogrinfo --formats" should list all the available drivers.  You
can use it to verify you got the OCI driver.

Also be careful that the update GDAL DLL is actually being used, not some
older build of the DLL or copy from some other package.  The easiest way to
verify this is to delete the old one, and verify that ogrinfo can't find a
GDAL DLL.  Then rebuild and replace it, and try again.

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    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list