|
-
Jan 16th, 2001, 06:14 PM
#1
Thread Starter
PowerPoster
Is there ant compiler out there, or any way to make a c/c++ program that is basically OS independent? Not a fancy program, maybe just a Hello World program. One that could say run on the consule window in windows, in MS-DOS say from a bootdisk, and then maybe on Linux, mac OS, etc. Like java sort of... The OS doesn't matter.
-
Jan 16th, 2001, 06:16 PM
#2
Monday Morning Lunatic
Not really. You can have portable code, but not a portable compiled program.
Why not use java?
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Jan 16th, 2001, 06:29 PM
#3
Thread Starter
PowerPoster
hmmmm.....
Well, so what is the Java VM programmed in? ASM? How is it able to run on so many different OS's/platforms? Are there any other languages besides java that are that flexible? And one last question...Say that you were to write your own OS, would you have to write your own c++ compiler?
-
Jan 16th, 2001, 06:33 PM
#4
Frenzied Member
The Java Virtual Machine itself is OS-dependant, but the bytecode that runs on it isn't. Every platform that Java programs will run on needs to have a version of the JVM compiled for it.
Harry.
"From one thing, know ten thousand things."
-
Jan 16th, 2001, 06:55 PM
#5
Addicted Member
Lets sum it up shall we
Code:
C is compiled Java is interpreted
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|