Working on a project at work, and at at home is a good way to re-enforce processes needed to get up and running as well as exposing cracks in your setup.
In this case it was my Eclipse Loves Cinder template
I followed my own instructions to get Eclipse up and running with Cinder C++ framework.
Then I noticed when I went to debug i was not sure what to do.
I had set it up at home, but it was very much a trial and error excercise so once it finally functioned correctly – i was not sure exactly what it was that I did that got it to work.
EclipseLovesCinder after running a build, executes a python script which creates an “Application Bundle” for your application so it looks and feels more like an OSX Application. Copying all files from ‘resources’ into the application’s resources bundle, if they have been modified since last time or did not exist.
An ApplicationBundle is actually just a collection of folders following a specific structure, this page helped me figure out how to create one http://www.eclipse.org/swt/macosx/
The second problem was getting debug to work which is probably as important as being able to create the application otherwise – good luck making anything besides HelloWorld.
Getting GDB (Debugger) to work:
- Select the debug, bug icon and – actually select the little arrow next to it.
- Select Debug Configurations
- Select C/C++ Application and click the “new” icon (looks like paper)
- Where it shows the application under
"C / C++ Application"select browse, and browse to “
Contents/MacOS/HelloEclipseat the end of that, because eclipse actually wants the binary not the psuedo-application directory
After that, you should be able to select debug, and if it worked it will stop on a break point at the launch of Main.
You can turn that off if you like, sometimes i do, by going to the “Debugger” tab in the options.
While a bit tedious – you only have to do it once so it’s not so bad.
Here’s the result of hitting a breakpoint. Callstack on the left, variables on the right.