Creating a simple Mac/Linux app THE REAL WAY

Started by
5 comments, last by CGameProgrammer 21 years, 11 months ago
Anyone know how to create a simple "Hello World" type application for Macintoshes and for Linux? I''m basically asking out of curiosity, wondering what I''d have to do to port my code. And I don''t care about the GLUT or SDL implementations - just the equivalent of Win32 API stuff. ~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
Advertisement
First off you have to pick a native windowing API. For the Mac OS there are Carbon and Cocoa. Carbon applications run on Mac OS 9 and Mac OS X, but don''t have the same feature set that Cocoa applications do, which only run on Mac OS X. Carbon is basically a band-aid that allows somewhat modified Mac OS 9 applications to run natively in Mac OS X. A great Cocoa book is "Cocoa Programming for Mac OS X" by Aaron Hillegass.

For Linux you, again, have to pick a windowing API. I''m a bit fuzzy here, but you can choose from GTK, Qt, GNUstep, and most likely many, many others. There are GTK tutorials on-line at http://www.gtk.org/.
you could look at the glut implementation to see how it does it even if you don''t want to use it. that''s what i''d do if i was trying to work it out for myself.
AP: Thanks, I didn''t even know Macs had more than one API choice.

petewood: That sounds like the best idea but I didn''t even know it was open-source. Where is the source code? MS.com?

~CGameProgrammer( );

~CGameProgrammer( );Developer Image Exchange -- New Features: Upload screenshots of your games (size is unlimited) and upload the game itself (up to 10MB). Free. No registration needed.
actually, if you''re looking for cross-platform support, I''m guessing there''s a Qt runtime for Mac OS X. There are several cross-platform windowing kits out there, all depends on what you want to do.
sorry i''ve taken so long to reply. check out opengl.org and they have links to glut stuff. microsoft don''t have anything to do with it. it was written by mark kilgard who worked for sgi and who now works for nvidia. it makes use of calls to opengl which are platform independent but has platform specific stuff to get it running on the correct OS.
quote:Original post by Anonymous Poster
For Linux you, again, have to pick a windowing API. I''m a bit fuzzy here, but you can choose from GTK, Qt, GNUstep, and most likely many, many others. There are GTK tutorials on-line at http://www.gtk.org/.


That would be limiting him some. He would be tied down to a specific API, which, in my opinion, is fragmented enough! He should just look into X11 programming, so the code would be truely portable to all graphical Linux systems. XFree86 Project.

"I am governed by none other than the Laws of the Universe."
"I am governed by none other than the Laws of the Universe."

This topic is closed to new replies.

Advertisement