windows C++ -> mac C++ dev

Apprentice
Posts: 18
Joined: 2006.12
Post: #1
Hi i just got a new mac! anyways i have done some games windows C++ in visual studios. I want to start programming games for the mac. I dled xcode today and don't know anything... Sad can someone plz tell me how to get started or how to make a c++ app? i'm completely lost with xcode....
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #2
In Xcode choose New Project (Command shift N) then select C++ Tool in the Command Line Utility section.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,560
Joined: 2003.10
Post: #3
If you're set on C++, you can use Carbon (a C API). Here's a place to start: http://developer.apple.com/referencelibr...index.html

If you'd be interested in learning Cocoa (an Objective-C API, which is easier to use than Carbon in a lot of ways), here's another place to start: http://developer.apple.com/referencelibr...index.html
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #4
Also, check out some SDL or OpenGL if you know it...

Also, if you just want to build from command line, I could suggest SCons (scons.org).
Quote this message in a reply
Apprentice
Posts: 18
Joined: 2006.12
Post: #5
thank u this should be just what i was looking for since i used to develop for the windows 32 API, Smile I'll let u know if i have any problems,
Quote this message in a reply
Member
Posts: 148
Joined: 2003.03
Post: #6
Note: you can use pretty much any project template for your C++ sources. I usually go with a Carbon app instead of a C++ tool.
Quote this message in a reply
Apprentice
Posts: 18
Joined: 2006.12
Post: #7
are there any tutorials on making a basic carbon c++ app in xcode. all those resources are great for when i start using graphics and stuff. i need something to start out simple like maybe a tutorial on making a program with a window that draws a box in it?
Quote this message in a reply
Apprentice
Posts: 18
Joined: 2006.12
Post: #8
I went here http://onesadcookie.com/Tutorials to see if i could get a window working, i got to the add framework step and went to project but couldn't find add framework in the dropdown menu Sad help?
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #9
You can just drag and drop the framework into your project!

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 1,140
Joined: 2005.07
Post: #10
Right click on one of the groups (usually Frameworks or one of the groups under Frameworks), and under the "Add" sub-menu, go down to Existing Frameworks, then find your framework. (often faster than finding the framework in Finder, especially since it starts in /System/Library/)
Quote this message in a reply
Apprentice
Posts: 18
Joined: 2006.12
Post: #11
ok i finished the tutorial, i have a few questions. can u use GLUT with c++ when making mac programs? or was that c++? i wasnt sure if what u make in that tutorial was a carbon or cocoa app. Sad also where can i find more tutorials or programming resources for GLUT? it seems like a pretty easy way to do graphics on the mac os,

i found this for more GLUT tutorials http://www.lighthouse3d.com/opengl/glut/index.php?1 (starts learning) now i just need to find a resource page with all the funtions and stuff GLUT has.... *looks at page* ok so is GLUT crossplatform? can i still use that tutorial to create mac programs in GLUT? sorry just a little confused with all this new stuff... Blush
Quote this message in a reply
Member
Posts: 90
Joined: 2006.11
Post: #12
since it included an cocoa framework, I can be pretty certain that was a cocoa app. and I think it is C. Otherwise, I don't know how I'd have understood it. (I have begun learning C, not C++)
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #13
GLUT is cross-platform.

The implementation of GLUT for Mac OS X is written in Cocoa; that's why you need the Cocoa framework. In the normal scheme of things you would call your app a "GLUT app", not a "Carbon app" or a "Cocoa app", though.

Mac OS X includes the man pages for all the GLUT functions. Try eg.
Code:
man glutGet
Quote this message in a reply
Apprentice
Posts: 18
Joined: 2006.12
Post: #14
thanks, that should help in searching for information on GLUT, there seem to be lots of tutorials and resources for it so it should be easy to use.

sorry what r man pages? and where do i type in that code to get to them?
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #15
Open up the Terminal. It's in Applications->Utilities. Then just type in man X where X is the function you want to know about. Such as
Code:
man glutGet
like OSC showed.

To scroll, you just use the arrows. Hit Q if you want to quit the man page and then you can type in another one if you'd like.
Quote this message in a reply
Post Reply