LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Programming on Linux (https://www.linuxquestions.org/questions/linux-newbie-8/programming-on-linux-121382/)

desolator 11-30-2003 06:04 PM

Programming on Linux
 
I was wondering, on linux, when you make programs, will they only work on linux? Or Windows and Linux? And which is better for programming games? Windows or Linux?

aaa 11-30-2003 06:16 PM

Programs compiled in Linux will only work in Linux. However, depending on what you put in your code, it could be possible just to recompile in Windows to make a Windows app.

ehawk 11-30-2003 06:28 PM

gcc for windows
 
If all you are doing is number crunching, "hello world" etc., I would think that Gnu's gcc for windows would work fine. Gnu has also created windows-based compilers for many other languages. I have never used it, but I have heard that Borland's kylix can be used to write code within linux that will run under windows with a simple flag used at the time of recompilation. Java always hypes it cross platform prowess. Haven't done any of these....just simple number crunching for me.... :) Games? Don't know....

desolator 11-30-2003 06:30 PM

Welll, what is the point of linux? Everybody uses Windows basically, no one wants to install linux just for one simple game!

qwijibow 11-30-2003 06:31 PM

you can use a cross compiler in linux to compile win32 binary's

like aaa said, simple source code will compile under windows or linux..
prvided you dont use any linux specific or windows specific headers...

for example, a program which only used "iostream.h" and "fstream.h" could compile under both OS's because iostream and fstream are standards.

desolator 11-30-2003 06:33 PM

I know, but what if you used the header <windows.h>? Would you be able to compile it in linux? I mean with a win32 compiler?

desolator 11-30-2003 06:41 PM

Come on, I am installing linux so I can start making games, I need help

qwijibow 11-30-2003 06:43 PM

Quote:

Welll, what is the point of linux? Everybody uses Windows basically, no one wants to install linux just for one simple game!
linux is not a gaming console, however it will run most games...
i have counter-strike, quake1, quake 2 and unreal tournament and unreal tournament2003 installed on linux...
of which all but counter strike are native.

the point of linux is a CHEAP, STABLE, SECURE opertaing system.
every1 uses windows because it comes free with PC's, and linux does not advertise itself, (not in the UK anyway)

i installed linux for one reason only.... to experiment with it, (im studying unix at university) and i knew i could use linux to learn BASH scripts, MAKE files and all the other things linux has in common with UNIX...

and i stayed with the operating system cos......
everything is free, there's no annoying TRIAL version software.....
i never come across a single virus, and although they exist, they are harmless (unless u give em ur root password)
and many many other reasons that i could list.

qwijibow 11-30-2003 06:45 PM

why install linux to make windows games ???????????
yes you can do it quite easily.....

but thats Like Learning German, so a German Teacher can teach you French....
you might aswell just learn French.

desolator 11-30-2003 06:46 PM

Well, I thought I could Linux for programming games and make them run on windows.

qwijibow 11-30-2003 06:49 PM

you can....

but why not just program then in windows ?

desolator 11-30-2003 06:54 PM

Becuase I can't find a decent compiler!

desolator 11-30-2003 06:54 PM

Oh and because I need linux so I can get a control panel for my web hosting customers

desolator 11-30-2003 06:58 PM

Does linux include windows compilers?

qwijibow 11-30-2003 06:59 PM

linux has windows compilers YES !
they are called CROSS compilers, and they do exist yes.


All times are GMT -5. The time now is 04:38 PM.