C++ Editor And Compiler For Mac

Active5 months ago

I'm looking for a text editor, much like TextMate (www.macromates.com) on Mac, but I want it to have a built-in compiler.

For example, I do not want an IDE like Visual Studio or Eclipse. I'm looking for an editor where I can click 'Run' and it will compile my code and show me the results in a terminal.

I know of a text editor, which is TextMate's sister application for Windows, but it does not have a built-in compiler. I also do not want to install Cygwin for g++/gcc.

Daniel Rikowski

The GNU compiler is the most popular C++ compiler, with the Visual C++ compiler probably being second. So it’s a good choice. If you install Xcode command line tools and download Eclipse CDT for the Mac, it should just work right away. C compiler for mac free download - C Compiler, CCS C Compiler, Digital Mars C/C++ Compiler, and many more programs. C++ Compiler For Mac? Discussion in 'Mac Programming' started. If you guys could point me in the right direction maybe give me some pointers on 1). What compiler I could use on Mac for C ++ 2). And any other pointers for me while I am learning to program! But I would beg that you test out writing code in an editor like Smultron.

47.1k49 gold badges221 silver badges308 bronze badges
hahuang65hahuang65

The GNU compiler is the most popular C++ compiler, with the Visual C++ compiler probably being second. So it’s a good choice. If you install Xcode command line tools and download Eclipse CDT for the Mac, it should just work right away. 14) Digital Mars C/C++ Compiler: Their IDE costs ($42.55) but the Basic C/C++ Win 32 compiler is free. Download Link 15) Xcode: This is for Apple Macs and is their version of GCC but purely for Apple’s own Mac OS Operating System. CPP Edit 1.285 - C++ compiler and editor. Download the latest versions of the best Mac apps at safe and trusted MacUpdate Download, install, or update CPP Edit for Mac from MacUpdate. This article is intended primarily for students leaning C++ for the first time on a Mac. It’s not a step-by-step tutorial on how to write and compile code in the applications described.

1,2625 gold badges22 silver badges36 bronze badges

closed as off topic by Brian Webster, Jim O'Neil, Mario Sannum, Sudarshan, EdChumFeb 21 '13 at 8:37

Questions on Stack Overflow are expected to relate to programming within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.

21 Answers

I use e which touts itself as TextMate for Windows - I wouldn't go quite that far, but it is good (it has the notion of bundles for different file types, lifted from TextMate).

It isn't free, but it's been worth the license fee.

UnslicedUnsliced
8,1057 gold badges46 silver badges76 bronze badges

It is based on Scintilla and is available under GPL.

Additionally I recommend downloading the MinGW port of GCC.

Daniel RikowskiDaniel Rikowski
47.1k49 gold badges221 silver badges308 bronze badges

VIM!!!

And now I've had my VIM rant I'm going to rant some more.

TextMate doesn't have a built in compiler. I don't think you fully grok programming at any level yet. TextMate simply has 'bundles' that are configured to call the Apple XCode tools. AFIK there are bundles for pretty much everything you can think of. Some things (like perl, python, etc) are installed on the base system with Mac.

If you want a compiler on windows you'll either need the MS tools or Cygwin, MingW, Digital Mars (not free), etc. There is no such thing as an editor with a built in compiler - the compiler MAY have been bundled in a package with the editor/IDE however (Code::Blocks from memory packaged Mingw). I think you should try Cygwin since it comes with VIM and a compiler, just like you want.

Adam HawesAdam Hawes
5,1121 gold badge17 silver badges29 bronze badges

It's going to be a steep learning curve, but have you tried Emacs ? It contains all the features of text mate and an IDE, if you know where to look. You can compile code at the push of a button, but you may have a few other things to get used to (like Ctrl-s is search, not save by default - but you can configure that - you may want to look at cua mode which will set some of the keys to the windows defaults ;)

l0st3dl0st3d
2,0721 gold badge22 silver badges29 bronze badges

I've always used EditPlus on windows and found it to be excellent in every way!

For Mac i use Smultron.

Community
Gary WilloughbyGary Willoughby
26.9k36 gold badges117 silver badges188 bronze badges

Have a look at http://en.wikipedia.org/wiki/Comparison_of_text_editors

Paul LydonPaul Lydon

Textpad is pretty good. In fact if it finds a java JDK installs it creates shortcut keys that allow you to compile and run applets and java applications

RadRad
7,9104 gold badges40 silver badges42 bronze badges

Scite can be a good Windows alternative

Best C++ Compiler For Mac


(source: scintilla.org)

Glorfindel
17.3k11 gold badges53 silver badges75 bronze badges
VonCVonC
890k327 gold badges2883 silver badges3468 bronze badges
Robert GouldRobert Gould
42.6k53 gold badges169 silver badges262 bronze badges

As much as I love to see more threads with Programmer's Notepad links, this topic has been covered loads of times on StackOverflow, here's a sampling:

As for getting compiling going, you can call your chosen toolchain in lots of different ways from most good text editors. If we say you want to do C++ development then at the most simple here is a set of steps you could take:

  1. Get Visual C++ Express (free) or MinGW
  2. Make a very simple makefile, something like the one below
  3. Set up a tool in your editor to call make in your file's current directory
Community
Simon SteeleSimon Steele
10.5k3 gold badges36 silver badges67 bronze badges

I don't get the 'built in compiler' demand - as far as I know there is no universal compiler :)

UltraEdit is not free but it has a plethora of different languages it supports.

Daniel Rikowski
47.1k49 gold badges221 silver badges308 bronze badges
zzzuperflyzzzuperfly
ninesidedninesided
19.3k13 gold badges75 silver badges103 bronze badges

Have you checked out Programmer's Notepad?

When I was in school for Java, the lovely teacher forced us to use a notepad to write the code, and we were suggested to use Programmer's Notepad.

Richard BRichard B
1,3081 gold badge14 silver badges30 bronze badges

Try Emacs. It's lightweight and extremely powerful with sane shortcuts. It will increase your productivity immensely. It can even cook your food!

fengshaunfengshaun
1,3361 gold badge11 silver badges20 bronze badges

You are asking for an editor that will allow you to compile and show the results in a terminal but is not an IDE??

Anyway...

This is the most lightweight editor that can be connected to a compiler for Windows.

UnknownUnknown
35.8k22 gold badges124 silver badges169 bronze badges

I use Komodo Edit. It has great support for XML, HTML, PHP, Python and other dynamic languages, and syntax highlighting for tons of other languages. The only con I can think of is the memory usage. Komodo is built in Python on the Mozilla platform, so it's not the lightest one around.

AKXAKX
51.6k4 gold badges57 silver badges71 bronze badges
unwindunwind
332k54 gold badges410 silver badges544 bronze badges

Source Insight is probabbly the best C/C++ editor in existence. It's also a really good C# editor.

It may not meet all your requirements, but you should check it out.

C Compiler For Mac

It really comes in handy when working with a large codebase.

It does not, however, have a built-in compiler.

But, you can download the Windows / .NET Framework SDK and hookup their command line compilers to Source Insight.

The only real downside is that it does not have a debugger. For debugging I would use Visual Studio (it has a very good debugger).

Scott WisniewskiScott Wisniewski
19.3k7 gold badges54 silver badges88 bronze badges

I used to use UltraEdit (mentioned in another answer), but earlier this year 'upgraded' to UEStudio, which is like a supercharged UltraEdit for programmers - includes built-in support for a variety of compilers and many, many other things. Details here: http://www.ultraedit.com/products/uestudio/differences.html

It's not free, but it's well worth what they ask for it. I had been using UltraEdit since 2001 and haven't felt the need to look at other editors outside of what IDM offer.

Of course, editors are like religion so... :)

MetalMikesterMetalMikester

I'd give a vote for Sublime Text 2 - It uses many of the textmate bundles and has a vast plugin/package system with a package manager as well. It's become my default editor on every platform, Windows, osx and linux

dstarhdstarh
2,7583 gold badges25 silver badges64 bronze badges

Intype - http://intype.info/home/index.php

The main thing I like are the themes - I love working with Dark Pastels, which is the default theme if I'm not mistaken. It's missing some features I would love, like code-block collapsing, but development is on-going, and I can hope to see these in the future.


(source: sampsonresume.com)

Glorfindel
17.3k11 gold badges53 silver badges75 bronze badges
SampsonSampson
230k63 gold badges483 silver badges536 bronze badges

Not the answer you're looking for? Browse other questions tagged c++windowscompiler-constructiontext-editor or ask your own question.

Active4 years, 8 months ago

I've just started a job where I'm programming in C on a Mac, which is my first experience using a Mac for development. For now I'm using Xcode as my editor, then using make/gcc/svn at the command line for compiling and source control.

Compiler

Is there a good, full featured IDE out there for Macs that will compile C code (something comparable to VS would be ideal), or should I stick with these low level tools?

EDIT: so I called Xcode a 'low level tool' because I was under the impression that it was just a text editor for code, like gvim. I will definitely look into it's compiling/source control features.

idmean
11.1k7 gold badges39 silver badges71 bronze badges
Graphics NoobGraphics Noob
6,93710 gold badges39 silver badges42 bronze badges

closed as off-topic by legoscia, showdev, QuinnG, Linger, hexacyanideOct 23 '13 at 19:32

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • 'Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.' – legoscia, showdev, QuinnG, Linger, hexacyanide
If this question can be reworded to fit the rules in the help center, please edit the question.

7 Answers

FrankFrank
30k84 gold badges213 silver badges308 bronze badges
stefanBstefanB
49.9k24 gold badges107 silver badges135 bronze badges

textmate - Download from Macromates website.

The latest version is textmate2 but some people choose to keep using textmate-1.5 because there are significant differences between the two versions and they're both awesome.

davidcondrey
24.4k7 gold badges87 silver badges119 bronze badges
bgwbgw
1,7581 gold badge17 silver badges28 bronze badges

I just stumbled over Qt Creator. It seems to hold up really nice where every other IDE failed me when working with a plain Makefile project.

XCode, Eclipse, IntelliJ or Netbeans wouldn't resolve dependencies, or load my project in a good way. In Qt Creator I could just point to New Project » Import Project » Import Existing Project and voila!

neu242neu242
9,30513 gold badges60 silver badges90 bronze badges

Remember that Objective-C is a superset of C (a pretty pure one, if I recall correctly). You should be able to use XCode for editing, compiling, and debugging.

Here's one solution (which tells you to create a C++ project, then rename main.cpp to main.c)... http://www.cs.nyu.edu/~s70201/C_In_Xcode/Xcode_Tutorial.html

NosrednaNosredna
61.4k14 gold badges89 silver badges119 bronze badges

Xcode can manage project and compile for you as any IDE. But if you're familiar with CLI, I would recommand you to use a good editor and your usual build tools. Emacs and vim are available on os x (using xcode just for its editor is not ideal). Many mac dev love the excellent TextMate editor, but it is not a free (as in freedom) software.

Frank
30k84 gold badges213 silver badges308 bronze badges
p4bl0p4bl0

Obviously 'good' is a subjective decision, but Xcode 3.2 is certainly up to par with what you can do in VisualStudio (if one considers VS good, is another thing of course).

I have a project with 250000+ lines of codes, 10 dylibs, helpfile, all in an SVN (Perforce) etc. and hardly ever go outside Xcode.

Xcode has a few peculiar ways to do some things and the debugger is not quite as powerful as the current one in VisualStudio, but overall there's hardly anything you can not do from within the IDE (and the options to adjust the shortcuts within the IDE, Debugger and Editor to your needs are really awesome).

gcamp
12.8k4 gold badges49 silver badges80 bronze badges
NicholazNicholaz

Not the answer you're looking for? Browse other questions tagged cmacoside or ask your own question.