[Mono-list] Mono embedding on Win32?

Jon Watte hplus@b500.com
Tue, 22 Jun 2004 11:06:23 -0700


Rest assured that I am aware of the binary format differences,
and the fact that I have to build two copies of the app. I just
want the embedding API to be the same, rather than going the
Mono route on Linux, but the managed C++ wrapper route on Win32.

My specific question was, indeed, how to get the Windows-format
link libraries for doing embedding on Windows.

Thanks for the answer, and here's hoping that someone else knows
how to get ahold of these.

Cheers,

			/ h+


-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com]On Behalf Of Andrew Arnott
Sent: Tuesday, June 22, 2004 10:50 AM
To: mono-list@lists.ximian.com
Subject: RE: [Mono-list] Mono embedding on Win32?


> I downloaded the installer for the beta3 release of Mono for
> Win32. I would like to embed Mono in a Win32 app, rather than
> using Microsoft .NET, because the app also runs on Linux.

I am pretty sure you can't embed Mono in your app in such a way that the
same compiled version of your app will run on Windows and on Linux.  Reason:
Windows expects a PE binary file, which you COULD put together.  But then
Linux is looking for an ELF binary file to execute.  The two formats are
mutually exclusive.  Plus, Mono must be compiled for each platform it will
run on.  If you compile your app on Windows with Mono embedded inside, that
same embedded Mono will NOT run on Linux.

But maybe you've thought of this and are planning on compiling and
distributing two versions of your app.  If so, I think that will run fine.
I'm afraid I don't have the expertise to answer your other questions.