[Gdal-dev] error in csharp bindings for ogr/gdal

Tamas Szekeres szekerest at gmail.com
Fri Jan 5 15:24:44 EST 2007


Hi Matthew,

You should export the GDAL_ROOT and a valid path for libproj.so to
LD_LIBRARY_PATH
in order to run the test.

In this case the sample app. was not able to load libgdal.so.

Best Regards,

Tamas



2007/1/5, Matthew Perry <perrygeo at gmail.com>:
> Hey folks,
>
>  Checking out the latest cvs head, I'm having troubles getting the
> csharp bindings working. I'm using the Mono 1.2.2.1_1 installer on
> linux.
>
> I ran the following steps OK:
> make veryclean
> make interface
> make
>
> But 'make test' fails with this error:
>
> LC_ALL=C mono createdata.exe Data pointlayer
>
> Unhandled Exception: System.TypeInitializationException: An exception
> was thrown by the type initializer for OGR.ogr --->
> System.TypeInitializationException: An exception was thrown by the
> type initializer for OGR.ogrPINVOKE --->
> System.TypeInitializationException: An exception was thrown by the
> type initializer for SWIGExceptionHelper --->
> System.DllNotFoundException: libogrcsharp.la
>   at (wrapper managed-to-native)
> SWIGExceptionHelper:SWIGRegisterExceptionCallbacks_ogr
> (OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate,OGR.ogrPINVOKE/SWIGExceptionHelper/ExceptionDelegate)
>   at OGR.ogrPINVOKE+SWIGExceptionHelper..cctor () [0x00000] --- End of
> inner exception stack trace ---
>
>   at <0x00000> <unknown method>
>   at OGR.ogrPINVOKE..cctor () [0x00000] --- End of inner exception
> stack trace ---
>
>   at <0x00000> <unknown method>
>   at OGR.ogr..cctor () [0x00000] --- End of inner exception stack trace ---
>
> make: *** [test] Error 1
>
> Indeed "libogrcsharp.la" does not exist nor do the other *.la files
> refered to in the dll config files.
>
> Any ideas?
>
> --
> Matthew T. Perry
> http://www.perrygeo.net
> _______________________________________________
> Gdal-dev mailing list
> Gdal-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/gdal-dev
>



More information about the Gdal-dev mailing list