Hello list,

While i tried to create an application which uses mapserver (http://hobu.stat.iastate.edu/mapserver/mapserver/build_output/4_6/full.zip) i get the error that it cannot load the DLL 'mapscript'.

I following steps were taken by me:
- Download http://hobu.stat.iastate.edu/mapserver/mapserver/build_output/4_6/full.zip
- Create a Console application in MS VS 2005 C#
- Add the csharp/examples/drawmap.cs to the project
- Add the csharp/mapscript_csharp.dll as reference to the project

The project builds succesfull

When i try to run the executable i get the following error:
System.TypeInitializationException: The type initializer for 'mapscriptPINVOKE' threw 
an exception. ---> System.TypeInitializationException: The type initializer for 
'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable 
to load DLL 'mapscript': The specified module could not be found. (Exception from 
HRESULT: 0x8007007E)
   at 
mapscriptPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_mapscript(ExceptionDelegate
 applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate 
divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, 
ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, 
ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, 
ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate)
   at mapscriptPINVOKE.SWIGExceptionHelper..cctor()
   --- End of inner exception stack trace ---
   at mapscriptPINVOKE.SWIGExceptionHelper..ctor()
   at mapscriptPINVOKE..cctor()
   --- End of inner exception stack trace ---
   at mapscriptPINVOKE.new_mapObj(String jarg1)
   at mapObj..ctor(String filename)
Which clearly contains the message:
System.DllNotFoundException: Unable to load DLL 'mapscript': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I tried placing the csharpt/mapscript.dll in the \bin\Debug\ folder and i placed it inside the c:\windows\system32\ folder, but i still receive the error.

I've tried to find more information about this message, but my best friend couldnt find anything about it.

How can i make this application run succesfully / where do i have to place the mapscript.dll(or more files?) ?


mvg,

--
Ing. Eduard Yeb Witteveen           Software Engineer
Hawar Information Technology bv   lid Dijkoraad Groep
De Wymerts 7  8701 WT                        Bolsward
Tel: +31 (0)515 570333         Fax: +31 (0)515 570335
http://www.hawarit.com/             nl_NL fy_NL en_US

Reply via email to