[Mono-list] Dll loading failure

Jurek Bartuszek koxta@koxta.net
Thu, 28 Apr 2005 18:05:44 +0200


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

Dnia 2005-04-28 17:47, U?ytkownik Michal Moskal napisa?:
> How did you compile asm->dll? 

To .so:
	1) nasm -f elf dodaj.asm -o dodaj.o
	2. ld --shared --soname dodaj.so -o dodaj.so dodaj.o

To .dll:
	1) nasm -f coff dodaj.asm -o dodaj.o
	2) /opt/xmingw/bin/i386-mingw32msvc-ld --shared -no-undefined
- --export-all-symbols -o dodaj.dll dodaj.o

A dll file created this way _does_ work when running myfile.exe on
windows. On linux - it doesn't (well, I don't know this for real, cause
I still can't force mono to search for his dlls in `pwd`)

> The file needs to be in the ELF format, linked as a shared library.
So, are you trying to tell me, that it is impossible to use dll files
with mono and DllImport?

> Specifically using dll from Windows won't work.
I don't think I'm following you :-\ As far as I know, dll is a
windows-specific format. Which dlls will work, then?

Regards,

Jurek Bartuszek
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFCcQnY6l8uJkeTVlMRAmQjAJ9noSGYJeXk3FO/iMC5XR9RMggWIwCguEgw
s8drwqc4RFq4mHgdt4WRpmY=
=G2hK
-----END PGP SIGNATURE-----