Jump to content
  • Advertisement
Sign in to follow this  
llamaSong

C++ Compiler for mac.

This topic is 4793 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all. I am looking for a C++ Compiler for mac. I have googled, C++ Compiler Mac, and the only ones that came up you have to pay for. I also have the Developer set for which came on my mac, it has Xtools/code in it which I believe can Compile for C++, the problem is it is amazainly confusing and I have no clue what to do with it. If any one can explain how to use Xtools/code to compile C++, or has a tutorial for xtools/code could you please let me know. Also if anyone knows of a free mac compiler could you tell me.

Share this post


Link to post
Share on other sites
Advertisement
I believe OSX distributions come with GCC (which is what Xcode uses under the surface). You should be able to use a terminal window and autotools to do a *nix-style build setup, but that's arguably not any less confusing than Xcode [wink]

A good way to get started with Xcode is to create a new "C++ Tool" project. It will at least show you how the IDE expects things to be layed out. All of the compiler settings (well, in theory all of them, but I suspect many are missing) can be found by double-clicking the name of a target in the Targets area on the project viewer.

Unfortunately I don't know of any good documentation for Xcode. It's a steaming pile of crap and easily one of the worst-designed IDEs I've ever had the misfortune of using. Apple's developer site has some handy reference material and mailing lists, though.

Share this post


Link to post
Share on other sites
Quote:
Original post by ApochPiQ
I believe OSX distributions come with GCC (which is what Xcode uses under the surface). You should be able to use a terminal window and autotools to do a *nix-style build setup, but that's arguably not any less confusing than Xcode [wink]

A good way to get started with Xcode is to create a new "C++ Tool" project. It will at least show you how the IDE expects things to be layed out. All of the compiler settings (well, in theory all of them, but I suspect many are missing) can be found by double-clicking the name of a target in the Targets area on the project viewer.

Unfortunately I don't know of any good documentation for Xcode. It's a steaming pile of crap and easily one of the worst-designed IDEs I've ever had the misfortune of using. Apple's developer site has some handy reference material and mailing lists, though.


Heres what I did.
Open up xcode
File
New Project
C++ Tool
Project Name C++ Tool
Finish
Targets
Double Click C++Test.1
Short Sample of what came up:
Build Build and Go Tasks Fix Groups Project Editing Mode
.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples.
.\"See Also:
.\"man mdoc.samples for a complete listing of options
.\"man mdoc for the short list of editing options
.\"/usr/share/misc/mdoc.template





Nothing about compile settings.

Share this post


Link to post
Share on other sites
Quote:
Original post by Boder
Are you giving up on Pygame?


No, I am looking for multiple paths. If both I can get pygame to work, I will use that, if I can get xcode to work, I will use that, if both work I will use pygame.

Share this post


Link to post
Share on other sites
I use XCode personally.
Here is how to set up a simple C++ project:

1) File, New Project, C++ Tool

This will create a basic C++ program that uses the stdc++ library

2) Name it, and put it in a directory.

If you "Build and Go" now, it should work, and a terminal window with "Hello, World!" should come up.


If you follow these directions, and it doesn't work, post what goes wrong.

Share this post


Link to post
Share on other sites
Quote:
Original post by visage
I use XCode personally.
Here is how to set up a simple C++ project:

1) File, New Project, C++ Tool

This will create a basic C++ program that uses the stdc++ library

2) Name it, and put it in a directory.

If you "Build and Go" now, it should work, and a terminal window with "Hello, World!" should come up.


If you follow these directions, and it doesn't work, post what goes wrong.


So lets say I make a Hello World Code, but in stead, it Says Hello Houston, should the terminal then come up "Hello, World!" "Hello HOuston"?.

Share this post


Link to post
Share on other sites
Computers don't like to single groups out. They would much rather say hello to the entire world, instead of simply Houston.

Share this post


Link to post
Share on other sites
Quote:
Original post by RDragon1
Computers don't like to single groups out. They would much rather say hello to the entire world, instead of simply Houston.


lol

Share this post


Link to post
Share on other sites
Well, you will have a final called "projectname.cpp" where projectname is replaced by your project name. It contains the main() method within it, and that is where the "Hello World" code is defined. Change that file, or erase it and add a new file with a main method to make your own program.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!