[Mono-list] existing managed C++-libraries for Mono and whats with csgl?

Freddy BL freddy_bl@hotmail.com
Tue, 30 Jul 2002 19:06:19 +0000

>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() {

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.

Freddy BL

Testen Sie MSN Messenger für Ihren Online-Chat mit Freunden: