go to start Mac Users With Homebrew Gcc And XCode Installed
|home |print view |recent changes |changed September 4, 2015 |
exact
|You are 54.237.183.249 <- set your identity!

Sections: getting GNU g++ compiler in Cevelop on Mac | How do I know which compiler I actually get? | Why can this be a problem? | Debug with gdb on Mac with Yosemite |

getting GNU g++ compiler in Cevelop on Mac ^

If you are like me (PeterSommerlad) using a Mac, you might want to use GCC 5.2 or later instead of the llvm-clang based XCode C++ compiler that is also called g++.

From Yosemite on, OS X gives you a hard time to call g++ from /usr/local/bin instead from XCode within Cevelop (for security reasons :-). On my system I'd like to get:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/texbin

I haven't found a reasonable easy and universal workaround, so there are several options:

How do I know which compiler I actually get? ^

You can look at the virtual "Include" folder in your projects. If it shows some paths starting with

/Applications/XCode.app/Contents...
you are using XCode's compiler
/usr/local/include
you are using homebrew's g++ compiler

Why can this be a problem? ^

On Yosemite the llvm-clang compiler should be modern enough for our lecture's exercises. However, at least one XCode clang version broke C++14 support for some C++14 features which have been working before and with the regular llvm-clang of the same release number.

Debug with gdb on Mac with Yosemite ^

Unfortunately gdb is not working when installed with homebrew, because Yosemite does not allow unsigned processes to control others. For this you have to codesign gdb with a certificate that you trust. Here is how: http://www.patosai.com/blog/post/installing-gdb-on-mac-os-x-yosemite

In addition to the code signing you might need to restart or kill the taskagent as said here: Restart the taskagted service, and sign the binary.

$ sudo killall taskgated
$ codesign -fs gdb-cert /usr/local/bin/gdb


|home |print view |recent changes |changed September 4, 2015 |
exact
|You are 54.237.183.249 <- set your identity!

Mac Users With Homebrew Gcc And XCode Installed
go to start