Archived

This topic is now archived and is closed to further replies.

CGameProgrammer

Creating a simple Mac/Linux app THE REAL WAY

Recommended Posts

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( );

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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/.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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( );

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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."

Share this post


Link to post
Share on other sites