[Mono-list] PINVOKE can't find 32 bit shared library on 64 bit MONO

Jonathan Pryor jonpryor at vt.edu
Sun Jun 7 16:56:54 EDT 2009


On Sat, 2009-06-06 at 08:30 -0700, johnslaby wrote:
>         johnslaby wrote:
>         I am trying to use PInvoke in an application. The library is a
>         32 bit .so. When I try to run the app, I get a 'DLL not found'
>         exception. Looking into more detail, there is a message in the
>         debug trace 'Wrong base ELF class: ELFCLASS32'. Does this mean
>         I either need a 64 bit version of the library or a 32 bit
>         version of Mono?
> We tested the app on a 32 bit Linux and it worked fine, so I guess we
> answered our own question. 

Yes.  However, if you're running openSUSE you can install the
mono-core-32bit package (and other -32bit packages), which will give you
a mono32 command you can use to launch your app.  Apps started with
mono32 will run in a 32-bit address space, so you'll be able to load
32-bit shared libraries while running under a 64-bit OS (though you
obviously will be limited to a 32-bit address space with mono32).

 - Jon




More information about the Mono-list mailing list