• Welcome to Valhalla Legends Archive.
 
Main Menu

C/C++

Started by Mangix, March 19, 2005, 01:35 AM

Previous topic - Next topic

Mangix

if i make a program in C or C++, will it work on Linux and Mac?

K

Yes, if it's source compatible.

Warrior

If it's compiled on the platform that you want to use it on most times since the implementation of the C runtimes vary from OS to OS see if you make a graphical C++ program under Windows you would have to use Linux to run it but for the most part if you use the standard libraries I believe you should be fine
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

MyndFyre

Quote from: Warrior on March 19, 2005, 07:20 AM
if you make a graphical C++ program under Windows you would have to use Linux to run it

...errr?

For cross-platform GUI support, I highly recommend wxWidgets.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

iago

It likely won't, unless you spend a lot of time trying to make it cross platform.

There are many toolkits like gtk, wxWidgets, etc. to help you.

Also, you should look into autoconf and automake which are standard tools for generating Makefiles which help you compile your code properly on every platform.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Adron

Also, command line programs are easy to make portable, very much easier than GUI.

Joe[x86]

You should probably try porting it to Java, which wouldn't be too hard because their both Carbon variants. Since java code is run through an executable itself, java.exe for Windows, a single "executable" .class file is usable under Windows, MacOS X, *nix, and any other platform the Java RE runs on.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

Mephisto

Quote from: Joey on March 19, 2005, 04:52 PM
You should probably try porting it to Java, which wouldn't be too hard because their both Carbon variants. Since java code is run through an executable itself, java.exe for Windows, a single "executable" .class file is usable under Windows, MacOS X, *nix, and any other platform the Java RE runs on.

He doesn't want to use an incomplete language like Java.  :)

Mangix

lol hahahahaha. i dunno how to code in C++. i just wanted to know if it was possible.