LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2003, 07:04 PM   #1
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Rep: Reputation: 15
Unhappy 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?

Last edited by desolator; 11-30-2003 at 07:39 PM.
 
Old 11-30-2003, 07:16 PM   #2
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
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.
 
Old 11-30-2003, 07:28 PM   #3
ehawk
Senior Member
 
Registered: Jul 2003
Posts: 1,257

Rep: Reputation: 48
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....
 
Old 11-30-2003, 07:30 PM   #4
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Welll, what is the point of linux? Everybody uses Windows basically, no one wants to install linux just for one simple game!
 
Old 11-30-2003, 07:31 PM   #5
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 11-30-2003, 07:33 PM   #6
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
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?
 
Old 11-30-2003, 07:41 PM   #7
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Come on, I am installing linux so I can start making games, I need help
 
Old 11-30-2003, 07:43 PM   #8
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 11-30-2003, 07:45 PM   #9
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
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.
 
Old 11-30-2003, 07:46 PM   #10
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Well, I thought I could Linux for programming games and make them run on windows.
 
Old 11-30-2003, 07:49 PM   #11
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
you can....

but why not just program then in windows ?
 
Old 11-30-2003, 07:54 PM   #12
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Becuase I can't find a decent compiler!
 
Old 11-30-2003, 07:54 PM   #13
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Oh and because I need linux so I can get a control panel for my web hosting customers
 
Old 11-30-2003, 07:58 PM   #14
desolator
Member
 
Registered: Nov 2003
Distribution: Slackware
Posts: 64

Original Poster
Rep: Reputation: 15
Does linux include windows compilers?
 
Old 11-30-2003, 07:59 PM   #15
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between Top Down programming & Bottom up programming minil Programming 1 06-17-2005 03:42 AM
New Forum for Linux-Gurus[Programming/Administration] or Linux-Advanced Users [ Progr raees LQ Suggestions & Feedback 5 04-12-2005 08:35 PM
C/C++ programming for linux leeman_s Linux - General 6 01-28-2003 07:16 PM
Exp. Windows/Linux-Script Programmer - Need Linux Programming Mentor! ruttiger Linux - Newbie 2 10-28-2001 12:00 PM
New to Linux programming .... need help Izhar Programming 2 10-17-2001 04:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration