[Mono-list] existing managed C++-libraries for Mono and whats with csgl?
Serge
serge@wildwestsoftware.com
Tue, 30 Jul 2002 23:38:28 +0300
> But I think - and you can test it yourself - that a mixed one is not
> possible. Somethink like
No, you're wrong here. Mixed code is certainly possible.
Consider this code, for example:
http://mono.eurosoft.od.ua/files/FFT_MCPP.cpp
Notice how cout and System.Console both used at the same time.
It's also possible to create pure .NET code using MC++,
but currently Mono refuses to load binaries emmited by VC++.
It's possible to disassemble those binaries, then assemble them again
and then execute them with Mono.
Sergey
----- Original Message -----
From: "Freddy BL" <freddy_bl@hotmail.com>
To: <mono-list@ximian.com>
Sent: Tuesday, July 30, 2002 10:06 PM
Subject: Re: [Mono-list] existing managed C++-libraries for Mono and whats with csgl?
> >Managed C++ libraries aren't very portable at all. The compiler
> >generates x86 code for some parts.
>
> No. I think, thats wrong.
> The problem is, that the MS-C++.net-compiler are two different compilers.
>
> For example:
> If you write
>
> #include <iostream>
> using namespace std;
>
> void main() {
> cout << "Hello World";
> }
>
> it creates native-code.
>
> But if you write
>
> #using <mscorlib.dll>
> #using <System.dll>
>
> void main() {
> Console::WriteLine("HelloWorld");
> }
>
> it creates .net-code. (I hope the example is correct. I don't have tested
> the example-code at the moment).
>
>
> But I think - and you can test it yourself - that a mixed one is not
> possible. Somethink like
>
> #include <iostream.h>
> using namespace std;
>
> #using <mscorlib.dll>
> #using <System.dll>
>
> vid main() {
> cout << "in native";
> Console::WriteLine("and in .net");
> }
>
> can't be compiled.
> So, for Mono only the .net-C++-compiler is important. The other one is like
> the g++.
>
> But it is possible, to rewrite all native-C++-Libraries for .net, too, so
> that it can be used in managed C++, too. But Microsoft haven't done it.
>
>
> Greatings
> Freddy BL
>
>
> _________________________________________________________________
> Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden:
> http://messenger.msn.de
>
>