C#/C++ Win32/Win64

O

Olaf Baeyens

Just a silly question:
If I understand correctly pure C# compiled as Win32 will run as Win64
without need to recompile.
But will pure managed C++ also be able to do that?

I also heard that pure C# just runs on Linux (Mono) without need to
recompile.
Could pure managed C++ do that?

It would be nice to have 1 executable that run on Win32, Win64 and Linux
without need to recompile.
 
R

Ronald Laeremans [MSFT]

Pure does not, but code compiled with /clr:safe should. It should generate
code that can run on any platform conforming to the CLI spec.

This is very similar to C# (for the 32/64 bit part at least). If you use
unsafe C#, you are very likely to be generating code that does not work on
both platforms.

Ronald Laeremans
Visual C++ team
 
O

Olaf Baeyens

Pure does not, but code compiled with /clr:safe should. It should generate
code that can run on any platform conforming to the CLI spec.

This is very similar to C# (for the 32/64 bit part at least). If you use
unsafe C#, you are very likely to be generating code that does not work on
both platforms.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top