Valhalla Legends Archive

General => General Discussion => Topic started by: Mangix on March 19, 2005, 01:35 AM

Title: C/C++
Post by: Mangix on March 19, 2005, 01:35 AM
if i make a program in C or C++, will it work on Linux and Mac?
Title: Re: C/C++
Post by: K on March 19, 2005, 02:15 AM
Yes, if it's source compatible.
Title: Re: C/C++
Post by: Warrior on March 19, 2005, 07:20 AM
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
Title: Re: C/C++
Post by: MyndFyre on March 19, 2005, 07:29 AM
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.
Title: Re: C/C++
Post by: iago on March 19, 2005, 01:51 PM
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.
Title: Re: C/C++
Post by: Adron on March 19, 2005, 03:01 PM
Also, command line programs are easy to make portable, very much easier than GUI.
Title: Re: C/C++
Post by: Joe[x86] 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.
Title: Re: C/C++
Post by: Mephisto on March 19, 2005, 08:31 PM
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.  :)
Title: Re: C/C++
Post by: Mangix on March 19, 2005, 10:43 PM
lol hahahahaha. i dunno how to code in C++. i just wanted to know if it was possible.