PDA

View Full Version : Doing C++ coding on a Mac?




illjazz
Sep 2, 2010, 09:30 AM
I didn't know where else to put this question.. so, short of installing Bootcamp and Windows so I can run VisualStudio, (which I really don't want to do JUST FOR THIS), what options do I have of writing and running C++ code on Snow Leopard?

I'm taking a Data Structures college class that uses C++, which is why I'm not too fond of the idea of installing Bootcamp and all that jazz just for this.

Thanks in advance!



mrbash
Sep 2, 2010, 09:33 AM
You would first install the developer tools. The developer tools get installed when you install XCode. XCode is Apple's equivalent to Visual Studio.

illjazz
Sep 2, 2010, 10:02 AM
Didn't know that! Thanks.. so if I have a file created on Windows with VisualStudio, can I open it right up with Xcode or do I have to make a new project in Xcode and just paste the code?

Thanks.

Hansr
Sep 2, 2010, 11:41 AM
Didn't know that! Thanks.. so if I have a file created on Windows with VisualStudio, can I open it right up with Xcode or do I have to make a new project in Xcode and just paste the code?

Thanks.

You can't open the VS project file in XCode but the header and cpp files are just text files and can be moved between IDEs easily.

gnasher729
Sep 2, 2010, 12:22 PM
Didn't know that! Thanks.. so if I have a file created on Windows with VisualStudio, can I open it right up with Xcode or do I have to make a new project in Xcode and just paste the code?

Thanks.

1. If you have Snow Leopard, go to developer.apple.com and download the latest XCode version. If you run Leopard (10.5) or Tiger (10.4), ask us what the latest XCode version is that you can use.

2. In XCode, File->New Project->Application->Command Line Tool, then change the type to "C++ stdc++". This will give you a project for code without a graphical user interface.

illjazz
Sep 7, 2010, 10:14 AM
Thank you! Everything works quite nicely :)