AWS Thinkbox Discussion Forums

Setting up on a Mac

Hi,
I’m not totally new to coding/development, but I am new to C++ and Xcode, so I’m having trouble even getting the Krakatoa SR examples up and running. Seems like this should probably be very simple, so apologies for the utter cluelessness, but I’m totally stuck, and can’t find any documentation to help me out.

What I tried:

  1. Create new Xcode project: Command Line Tool set to C++
  2. Added the entire API folder to the project
  3. Swapped the code of one of the examples into the ‘main.cpp’ file
  4. Tried to run it

Throws up all kinds of errors:

[/quote]
Clearly, I have absolutely no idea what I’m doing to get this working. Can anyone help me get started?

Thanks so much,

SK

Hi kinkersnick… I’m not entirely sure what the issue is with your setup, but I will take you through what I did to get it to work for me, can you try out these steps:

Step 1. Create a new C++ project:

  • Launch Xcode
  • Create a new Xcode project
  • Select OS X > Application > Command Line Tool
  • I called mine KrakatoaTester, and selected the Type as C++ and disabled auto reference counting
  • Set the project directory

Step 2. Add the KrakatoaSR to the include path:

  • Under “Targets”, select KrakatoaTester
  • Select “All” under the Basic/All/Combined/Levels buttons.
  • Scroll down to “Apple LLVM compiler 4.0 - Lanugage” rollout
  • Expand “Other C Flags”.
  • Under both release and debug, add this line:
-I/path/to/krakatoasr/include/
  • In main.cpp, add:
#include <krakatoasr_renderer.hpp>
  • Select Product > Run, and it should build correctly and print “Hello World!”.

Step 3. Add the KrakatoaSR linker library.

  • Under “Targets”, select KrakatoaTester
  • Scroll to the “Linking” rollout
  • Expand “Other Linker Flags”
  • Under both release and debug, add this line:
-L/path/to/krakatoasr/lib-osx-x64/ -lKrakatoaSR
  • In main.cpp, add this to the main function:
krakatoasr::krakatoa_renderer r;
r.render(); //lanuch an empty render
  • Also, for some reason I had to copy libKrakatoaSR.dylib, libtbb.dylib and libtbbmalloc.dylib into /usr/lib/. I’m working on getting it working without having to copy those files because there is a way around this.
  • Select Product > Run, and it should print out a little Krakatoa message.

From there you can use any of the sample code. Let me know how that goes.

Ah, great! Thank you so much!
Got it working by following your steps.
Now to fall down the rabbit hole that is KrakatoaSR …

Thanks!

I have no idea, did you end up solving this problem?

Privacy | Site terms | Cookie preferences