Daniel Morgan wrote:

Thanks for your replies.  They have been very encouraging and helpful.

If binary UNO interface is just C and not C++, this is a very good thing.

As an example:
GTK# is a wrapper around the gtk+ tookit. gtk+ is used in the GNOME desktop. GTK# has a native glue library for each platform it runs under. The glue library is written in C just like the gtk+ toolkit. It is built using the GNU GCC C compiler on Windows, Linux, and Mac OS X. Of course, the GNC GCC C compiler on Windows uses Cygwin and MingW to accomplish this. The Mono C# compiler, Mono runtime, and GTK# were first ran on Windows. Development later happened on Linux when these things became self-hosting.


Maybe the same thing can happen with a CLI-UNO that uses C# and a C glue library or libraries instead of Managed C++.

We might also have luck with CLI-UNO on Mono if it can be built with it with the .NET 2.0 C++ compiler in pure IL mode.
There is also a Mono tool called cilc that may or may not help.


cilc is the Mono CIL-to-C binding generator. It takes a CIL assembly
as input and generates a directory of C sources which, when compiled,
provide a C interface to the classes contained within that assembly by
means of a shared object library.
(from the cilc man page).


Mono also has ikvm which let's you run Java programs on Mono.
That seems to me proof of working C interface to the runtime. Then the Mono_CLI_UNO bridge could be basically similar to the JNI-UNO bridge.

These are just some options to consider.

So, I guess the thing to do is figure out how climaker works and port it to C# and a C glue library.

"The binary UNO interface is defined in C. That means, that a CLI runtime must be accessable through a C interface. For example, the Java bridge uses the Java Native Interface. "

The CLI-UNO bridge depends on the capability of the C++ compiler to produced mixed code. That is, the library contains native code and managed code. This cannot be simply devided.

As far as I know, Mono does not provide such a C++ compiler. So you need to look for a way to make C code speak to CLI code and vice versa. If you have sorted this out you should have a close look at the Java bridge, to get an understanding of how the bridge works.

It is difficult to understand how the bridges work. So you could spend quite some time over it. However, if you are serious the Java JNI bridge is a good starting point.

You must also take into account that you need to provide the UNO types as CLI types. We have a tool called climaker which does this (project cli_ure). climaker is also written in managed C++ code and uses extensively the System.Reflection.Emit classes. It is used to create assemblies containing all the UNO interfaces, Enums, etc.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Joachim

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to