[Mono-list] DllNotFoundException

Jerzy Bartuszek koxta@koxta.net
Thu, 28 Apr 2005 11:20:14 +0200 (CEST)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

I've finally created a dll that works. However, it works only on windows:

nasm -f coff Add.asm -o Add.o
/opt/xmingw/bin/i386-mingw32msvc-ld --shared -o Add.dll Add.o
- - -no-undefined --export-all-symbols
mcs main.cs

running main.exe under windows (when Add.dll is in the same directory as
executable) works:

Result: 5 (the Add.dll includes the int Add(int, int) function).

Anyway, running mono main.exe still gives:

koxta@limbo csharp $ mono main.exe

Unhandled Exception: System.DllNotFoundException: Add.dll
in (wrapper managed-to-native) Whatever:Add (int,int)
in <0x0000f> Whatever:Main ()

Do I forget about something?

Regards,

Jurek 'Koxta' Bartuszek

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCcKrO6l8uJkeTVlMRAgnyAJ4z0Nb8V9VI5BdKjPPj2sh02q4i1wCfdjY/
+lTC1iC4IAMYOkHbgereyhU=
=gX+B
-----END PGP SIGNATURE-----