fevans wrote:
*trim*
So when I run the command 'mono GDALInfo.exe' it returns a usage statement. no errors. But when I run 'mono GDALinfo.exe foo.tif', I get a type-loader exception.
*trim*
This is a yes, me too response, but I've done some analysis on my own.
First I was stuck on the DllNotFoundException. My next step was to call GDALAllRegister on gdal_fw (Gdal_wrap uses this one).
(*All code was not cut and pasted*)
[DllImport("gdal_fw")]
public static extern void GDALAllRegister();
And created a small console app that runs this. When run from command line it runs just fine, but when run with mono it gave a DllNotFoundException (startled). The DLL could be found just fine, the environment path was the same, it pointed to the bin of gdal (I've used fwtools 2.2.8) ,.. so what could have gone wrong?
I've PInvoked LoadLibrary from Kernel32
[DllImport("Kernel32"), SetLastError = true)]
Public extern static int LoadLibrary(string name);
When you run :
Console.WriteLine(LoadLibrary("gdal_fw"));
With normal .net it runs fine, a handle is returned. under mono it fails with error code (getlasterror) 182 meaning invalid ordinal?
I've checked the dll dependencies of gdal_fw,.. and long story short, it seems the ssleay32.dll fails to load (182) when mono is run. The dependencies of ssleay32 load just fine. btw folks these are all unmanaged dll's..
Now it's time for me to give up. Hoping someone finds a solution, or an explanation why this would occur with mono running.
regards
Floris Briolas
(used mono 2.0.1 on win xp)