[gdal-dev] Problems with C# ogr_wrap.dll

Tamas Szekeres szekerest at gmail.com
Thu Feb 11 08:14:45 EST 2010


Tom,

It depends on the platform target settings and the your current framework,
which kind of binaries should be used, see the table below:

Platform target                Executing environment (Framework version)
          binary package should be used
/x86
x86                                                                      x86
/x86
x64                                                                      x86
/x64
x64                                                                      x64
/AnyCPU
x86
x86
/AnyCPU                         x64
                             x64


All other combinations are not supported, and will probably result in
BadImageFormatException.


Best regards,

Tamas




2010/2/11 Tom van der Putte <tom at vdputte.nl>

> Hi Tamas,
>
> Thanks for the reply. I tried your method in the overkill-mode to be sure:
> copying all dlls from gdal\bin and gdal\bin\gdal\csharp and this worked with
> the 32bit (not the 64 bit). I had already set the path to gdal\bin so I
> don't understand why it doesn't work but hey, I'm a happy man!
>
> Cheers!
>
> Tom
>
>
> On Wed 10/02/10 18:03 , Tamas Szekeres szekerest at gmail.com sent:
>
> Hi Tom,
>
> In this case you'll have to set a reference to ogr_csharp.dll and make sure
> the unmanaged dll-s (ogr_wrap.dll and it's dependencies like proj.dll) are
> available to load by the application, either by copying these dll-s into
> your executing directory or make them available in the PATH environment.
>
> Best regards,
>
> Tamas
>
>
>
> 2010/2/10 Tom van der Putte <tom at vdputte.nl>
>
>> Hi,
>>
>> I'm currently having a problem getting the C# OGR binaries to work on a
>> 64bit WinXP Pro machine, using VS2008 Pro. Ive tried both the 32bit Binaries
>> and the 64 bit binaries.
>>
>> * Using the 32bit binaries from
>> http://vbkto.dyndns.org:1280/sdk/Default.aspx as well as the general FW
>> windows binaries:
>> I set the target platform to x86, added the reference path to the 32bit
>> binaries and added those as a reference. However the ogr_warp.dll is nowhere
>> to be seen in the references. Calling the Ogr.RegisterAll(); results in the
>> error :"Unable to load DLL 'ogr_wrap': The specified module could not be
>> found. (Exception from HRESULT: 0x8007007E)"
>>
>> When I manually try to add the dll under the references, it says it cannot
>> do so, and I have to check that it is either in use, or a valid assembly.
>>
>> * Using the 64bit binaries from
>> http://vbkto.dyndns.org:1280/sdk/Default.aspx, and the target platform
>> set to x64, the ogr_wrap.dll file is not in the bin/debug dir, and I get an
>> error: "An attempt was made to load a program with an incorrect format.
>> (Exception from HRESULT: 0x8007000B)"
>>
>> If I add the ogr_warp.dll to the debug/bin folder, the "Unable to load DLL
>> 'ogr_wrap': The specified module could not be found. (Exception from
>> HRESULT: 0x8007007E)" error pops up.
>>
>> Any ideas?
>>
>> Cheers,
>>  Tom
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> gdal-dev mailing list
>> gdal-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100211/fdfac27a/attachment-0001.html


More information about the gdal-dev mailing list