developing on Mac?
I''m planning on getting a new desktop computer soon, and I''m entertaining the possibility of getting one of those sexy new macs. I keep hearing about how OS X is "based on" unix, and how it has a CLI interface, and stuff. But I''d like to find out how the Mac compares as a machine primarily used for developing.
Specifically, can I develop an application in OS X exactly the same as if I was developing on Linux? Will I be able to bring a project to a Linux machine and recompile it with 0 extra effort? Can I make a full-blown game on OS X while remaining completely ignorant of the Mac API?
thanks!
In theory, yes.
Darwin, the OS X kernel, is open source and a variant of the FreeBSD kernel. That means that anything that will compile on a BSD machine can compile on an OS X machine, provided that you have the correct libraries. Because of this, that means that in addition to Aqua, you can also have X on your Mac, so you should literally have no problems using a Mac as a development platform for applications geared towards UNIX machines.
http://chaos.webhop.org
Darwin, the OS X kernel, is open source and a variant of the FreeBSD kernel. That means that anything that will compile on a BSD machine can compile on an OS X machine, provided that you have the correct libraries. Because of this, that means that in addition to Aqua, you can also have X on your Mac, so you should literally have no problems using a Mac as a development platform for applications geared towards UNIX machines.
http://chaos.webhop.org
Exactly the same? No. There are diferrences between Linux and OS X. But the differences are no more severe than say FreeBSD and Linux. For example, alloc.h doesn''t exist on OS X, it''s functionality is instead in stdlib.h. Actually a lot of headers don''t exist on OS X. Instead their functionality is migrated to either unistd.h or stdlib.h. Some particularly ugly functions also aren''t supported like fcvt().
The big thing to watch out for is that Macs are big-endian while most Linux installations are little-endian. So as long as your code was endian clean to begin with porting a program should relatively simple. If it wasn''t endian clean.... well good luck.
As for writing a game while remaining ignorant of the Mac API... if you are already familiar with Linux programming you''re already familiar with big parts of the OS X''s system calls, since OS X implements most of the posix standard.
The big thing to watch out for is that Macs are big-endian while most Linux installations are little-endian. So as long as your code was endian clean to begin with porting a program should relatively simple. If it wasn''t endian clean.... well good luck.
As for writing a game while remaining ignorant of the Mac API... if you are already familiar with Linux programming you''re already familiar with big parts of the OS X''s system calls, since OS X implements most of the posix standard.
April 02, 2004 04:40 PM
i actually found compiling linux based stuff on the mac fairly annoying, if only because of the fact that they 1) moved headers (like GL/gl.h --> OpenGL/gl.h) and 2) introduced the concept of a "framework" instead of / in addition to a simple library.
i really don''t like the way some of the opensource frameworks (SDL, glut) are distributed for the mac -- you end up with weird code in your project because of trying to talk to the Aqua window system -- things like "SDL_main.m" have to be in your project. this is not really the fault of SDL, but more the choice of Objective C as the "native" language for windowing toolkits on OS X.
so it''s never as clean as a recompile -- unless, perhaps, you''re okay with using XWindows on the mac, then it''s probably not as bad.
i really don''t like the way some of the opensource frameworks (SDL, glut) are distributed for the mac -- you end up with weird code in your project because of trying to talk to the Aqua window system -- things like "SDL_main.m" have to be in your project. this is not really the fault of SDL, but more the choice of Objective C as the "native" language for windowing toolkits on OS X.
so it''s never as clean as a recompile -- unless, perhaps, you''re okay with using XWindows on the mac, then it''s probably not as bad.
Darwin open source?
i thought it''s half-open... meaning you can get the code but you are not allowed to do shit with it.
i thought it''s half-open... meaning you can get the code but you are not allowed to do shit with it.
Life's like a Hydra... cut off one problem just to have two more popping out.
Leader and Coder: Project Epsylon | Drag[en]gine Game Engine
quote: Original post by RPTD
Darwin open source? i thought it''s half-open... meaning you can get the code but you are not allowed to do shit with it.
The Apple Public Source License 2.0 (which, as far as I know, is what Darwin is licensed under) is considered Open Source by the OSI (which is basically the authority on the term "open source"). I haven''t read the license carefully in a long time (and have since forgotten the gist of it), but from my quick re-scanning over it, it seems perfectly reasonable (reminds me of the Mozilla Public License 1.1 to an extent).
Your complaint sounds more like what is often (more than rightly, in most cases) said about Microsoft''s "shared source".
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement