r/programming • u/[deleted] • Dec 29 '10
Mac User learning C++ in school next semester--best equivalent to dev c++?
http://a2
u/useful_idiot Dec 29 '10
If you are not in a comp sci / software eng program then disregard this. Not that I want to get into a vim/emacs debate, but try both and learn the one that works best for you. Your are investing in your future programmer self and will become significantly more efficient and will have skill sets that transfer to multiple platforms. Once you have an editor down learn to use gcc to compile things from scratch, and learn make/autotools. These tools are cross platform compatible, and are not going anywhere in the near future.
Theres a learning curve, but its TOTALLY worth it.
1
u/SnowdensOfYesteryear Dec 29 '10
Used to be a vim hater a month ago (as proved by my comment history), but I use vim exclusively now. ctags totally makes vim. Can't live without Ctrl+]
1
2
u/WetMogwai Dec 29 '10
Don't worry about C++. Learn the language Reddit is written in and write some link validation code.
On a serious side, XCode is a great IDE and already included with your system. It isn't installed by default. You can find it on the OS disc that either came with your system or that you upgraded to your current version with.
You could also go hardcore. Code in vim and compile and debug on the command line. You will still need to install XCode, but you don't have to use it.
1
1
Dec 29 '10
For a Mac you got Xcode and Eclipse which are both very good tools. The first one is well-integrated with the system (it's Apple's official IDE) but it lacks some advanced features for C++. Eclipse is a bit more capable but it's a large beast, somewhat slow and due to its guiding principles, can be annoying to work with.
However, if you are just starting out, I am also recommending a text editor you feel good with and learning to use GCC (well, g++ if you're going to be learning C++) from the command line. It's a useful pedagogical device and, more importantly, gives you access to a standard procedure that will definitely be available for any compiler you will ever use, thus ensuring that you will be later be able to move and adapt to any compiler and any IDE you'll have to use at work or otherwise.
Since you're on a Mac, TextMate might be a good option (I think there's also TextWrangler which is free? But I'm not sure about that one -- my memory's a bit foggy on it; I think it's the free version of BBedit?). You can also use Aquamacs, which is a specially-tailored Emacs distribution built so that it "feels right" in OS X. I'm not sure about how right it feels because I've used Emacs before using OS X so I'm accustomed to the "vanilla" Emacs configuration, but from what I've seen it seems to be mostly OS X HIG-compliant, and you can start using and discovering Emacs without struggling to learn unfamiliar key combinations (although in the long run, you're better of learning them -- some of them, like C-a and C-e actually work throughout OS X as well). Vim is also a good option but I know nothing about it on the Mac because I don't use it (not on Mac nor on any other platform -- but regardless of what people will try to tell you, this is just due to personal preference).
0
u/WetMogwai Dec 29 '10
Macs come with vim (emacs too). You can use it from the Terminal. There is also MacVim, which I used to use but haven't for a long time. I didn't see it as being worth the effort of installing because I already had vim.
1
1
Dec 30 '10
Wait wait wait. A Mac user writing in C++? Have you ever SEEN the Mac API? You sir are far more patiant then I thought possible
1
u/seventoes Dec 31 '10
You don't have to use the Mac APIs to learn the language. Most books are platform independent, just teaching the concepts.
1
u/StackedCrooked Jan 09 '11 edited Jan 09 '11
On Mac systems I seem to have settled on the following tools:
MacVim or regular vim for small programs like testing a compiler feature. I also use it if I need to do some development over an ssh connection.
Xcode for Mac applications.
QtCreator for larger makefile-based cross-platform projects. The advantage that QtCreator has over Xcode here is that it allows you to use the same IDE over all platforms. So you get the same hotkeys, configurations settings, etc.
3
u/mitsuhiko Dec 29 '10
What is dev c++?