Universal environment for running programs written in C++

A

Andrzej

Greetings.

Is there any project of universal environment for running programs
written in C++ ? For example a programmer compiles program using
compilator and linker that produces universal executable file (not
system executable file) and then he starts that program using some kind
of emulator that can be implemented in any platform.
That is like Java but only for C/C++ programs.
Is there somewhere such project ?


+ +
 
V

Victor Bazarov

Andrzej said:
Is there any project of universal environment for running programs
written in C++ ? For example a programmer compiles program using
compilator and linker that produces universal executable file (not
system executable file) and then he starts that program using some
kind of emulator that can be implemented in any platform.
That is like Java but only for C/C++ programs.
Is there somewhere such project ?

If you don't receive any confirmation, does it mean there isn't any,
or does it mean your question didn't reach somebody who knows?

I know that there is a project Microsoft pushes, called CLR (common
language runtime), which is capable of running programs compiled from
several languages, including Managed C++. It isn't C++. It's C++
with some necessary extensions. Read more about it on Microsoft Web
site.

I don't see the need for such "universal environment". Do you?

V
 
P

Phlip

Andrzej said:
That is like Java but only for C/C++ programs.

Java is hardly a good example.
Is there somewhere such project ?

Yes, "managed C++" is one flavor of Microsoft's CLR system.

Yet another bad example of treating Java as a good example...
 
R

Rolf Magnus

Phlip said:
Java is hardly a good example.

It is?
Yes, "managed C++" is one flavor of Microsoft's CLR system.

However, it's not C or C++. It's more like C#, but with the syntax a little
closer to C++.
Yet another bad example of treating Java as a good example...

Well, if YOU say so, it must be true, even without giving any reason.
 
K

Kaz Kylheku

Andrzej said:
Greetings.

Is there any project of universal environment for running programs
written in C++ ? For example a programmer compiles program using
compilator and linker that produces universal executable file (not
system executable file) and then he starts that program using some kind
of emulator that can be implemented in any platform.

A PC can be emulated in "any" platform. So a program written in C++ and
compiled for some operating system that runs on a PC is, effectively,
universal.

Take a look at QEMU, VMware, etc.

http://en.wikipedia.org/wiki/Comparison_of_virtual_machines
 
J

Jerry Coffin

Greetings.

Is there any project of universal environment for running programs
written in C++ ? For example a programmer compiles program using
compilator and linker that produces universal executable file (not
system executable file) and then he starts that program using some kind
of emulator that can be implemented in any platform.
That is like Java but only for C/C++ programs.
Is there somewhere such project ?

There have been attempts in (at least) two different directions.
Microsoft has a common language runtime that supports a couple
variants of C++. The first attempt was what they called "Managed
C++". The current version they call "C++/CLI". Unlike Managed C++,
C++/CLI appears to be C++ with conforming extensions.

Quite a while ago (in the '80s) DCE tried to create something a bit
different -- a universal executable format that would be translated
to native executable code at load time. A fair number of companies
put quite a bit of effort into it, but I don't believe there was ever
a real implementation (though IIRC, the work for this formed the
basis of DEC's environment for executing x86 code on the Alpha).
 
D

Daniel T.

Andrzej said:
Greetings.

Is there any project of universal environment for running programs
written in C++ ? For example a programmer compiles program using
compilator and linker that produces universal executable file (not
system executable file) and then he starts that program using some kind
of emulator that can be implemented in any platform.
That is like Java but only for C/C++ programs.
Is there somewhere such project ?

Several people have mentioned Microsofts C++/CLI. Seems to me though
this is far from a "Universal environment".
 
J

Jerry Coffin

[ ... ]
Several people have mentioned Microsofts C++/CLI. Seems to me though
this is far from a "Universal environment".

Yes and no -- Microsoft (predictably) supplies the CLI only for their
own OSes, but at least in theory it could be supplied for others --
and the Mono project is at least attempting to do exactly that.
 
H

Howard

Andrzej said:
Greetings.

Is there any project of universal environment for running programs written
in C++ ? For example a programmer compiles program using compilator and
linker that produces universal executable file (not system executable
file) and then he starts that program using some kind of emulator that can
be implemented in any platform.
That is like Java but only for C/C++ programs.
Is there somewhere such project ?

Define "any platform".

Isn't that the idea behind writing "portable" C++ code, so that the code can
be compiled on any platform for which you have a conforming C++ compiler?
Why partially compile on one platform, only to have to have some kind of
emulator or translator do the last step for you on each platform you want to
use?

-Howard
 

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

Members online

Forum statistics

Threads
474,433
Messages
2,571,683
Members
48,796
Latest member
Greg L.

Latest Threads

Top