tags:

views:

1931

answers:

8

I am a first year Comp. Sci. student and am looking for the best way to develop C++ on a Mac. I have Xcode and Textmate.

What are the benefits/negatives of each? Are there any better ones?

Do you have any tips?

I am not a fan of having to use a project to run programs with Xcode. Is this the only way to do it, or am I mistaken?

+1  A: 

Eclipse

David Basarab
Please eloborate. One line answers with a link is not a valid answer.
Diago
+7  A: 

I personally use Vim for editing everything. It takes getting used to but it makes everything easy as can be (http://macvim.org/OSX/index.php). I would recommend Eclipse for a beginner however (http://www.eclipse.org/downloads/)

faceless1_14
The macvim you linked is no longer under development since 2007. Check out http://code.google.com/p/macvim/ for a much more up-to-date and Mac-like vim
redacted
Ah thank you for that clarification actually its been a few years since I've used a Mac. Good to know if I ever go back to OS/X
faceless1_14
@redacted: "Mac-like vim"? I feel like vim will always be pretty un-Mac-like. The only thing less Mac-like is probably Emacs ;-)
Joachim Sauer
@joachim - touché :)
redacted
+2  A: 

Xcode

Best around, for OS X at least.

Lark
+1  A: 

For a complete c++ IDE, I like NetBeans. It is much easier to import an existing Makefile-based project into Netbeans than Xcode or Eclipse, the editor is completely customizable, and the code completion and navigation are simple to learn. TextMate is also great for quick editing of files and has an excellent interface for the Find in Project command.

And, the Aquamacs implementation of Emacs for the Mac is fantastic. Like vim, emacs has a rather steep learning curve but is a very powerful editor for c++ development. Using the Emacs Code Browser you can get most of the IDE functionality available in other options like Xcode or NetBeans.

As for other languages, I find Netbeans to be far superior to Eclipse for Python development. The hints, error checking, and library completions have really cleaned up my Python code. However, NetBeans is inferior to the Photran plugin in Eclipse for Fortran development. The Fortran support in NetBeans provides little more than syntax highlighting.

Michael Schneider
+5  A: 

I am not a fan of having to use a project to run programs with Xcode. Is this the only way to do it, or am I mistaken?

You are mistaken.

You do not need to have an XCode project to use XCode as an editor, nor do you need to use the XCode build system (though there are advantages to doing so). You can open any source file to edit in XCode, and you can compile from the command line with g++ / make / other standard tools.

Note that you can invoke the XCode editor from the command line via the 'xed' command, which is often useful when you're doing this sort of development:

fusillade:~ tyrone$ xed someFile.cpp
Stephen Canon
A: 

Emacs also is a good alternative to VIM

CyberMing
A: 

Until now I use a combination of Xcode for compilation and debugging and Qt Creator for coding. Qt Creator has much better code completion. You could also wait for Xcode 4. It will be a major leap, also for C++!

A: 

i just use vim
go into the terminal
type
vim yourfilename.cpp
and then
to compile and run
g++ -o outputfile youfilename.cpp (source file)
./outputfile

x21-1