Hi,<div><br></div><div>Make sure all the dependent dll-s like ogr_wrap.dll, gdal19.dll proj.dll ... are available in the appllication directory or the location added in the PATH environment variable.</div><div><br></div><div>
Best regards,</div><div><br></div><div>Tamas</div><div><br></div><div><br><br><div class="gmail_quote">2013/4/5 Casper Børgesen (CABO) <span dir="ltr"><<a href="mailto:CABO@niras.dk" target="_blank">CABO@niras.dk</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="DA" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US">I am experiencing some problems with C# and GDAL/OGR.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">I have a program where I just initialize GDAL/OGR with this command:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">    OSGeo.OGR.Ogr.AllRegister();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">    // Here follows some IO and data processing, and its working just fine.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Now I add a simple line to my program:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">    OSGeo.OGR.Ogr.AllRegister();<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">    var a = OSGeo.OGR.Ogr.OGRERR_NONE<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New""><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">    // Here follows some IO and data processing, and it used to be working.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">The type initializer for 'OSGeo.OGR.Ogr' threw an exception.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">…The type initializer for 'OSGeo.OGR.OgrPINVOKE' threw an exception.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">…… The type initializer for 'SWIGExceptionHelper' threw an exception.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-family:"Courier New"">……… Unable to load DLL 'ogr_wrap': The specified module could not be found. (Exception from HRESULT: 0x8007007E)<u></u><u></u></span></p>

<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Can anyone push me in the right direction so I can determine why using Ogr.OGRERR_NONE would break my program?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">Regards Casper<u></u><u></u></span></p>
</div>
</div>

<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div>