Setting up on a Mac

Use this forum for discussions specifically related to the Krakatoa SR C++ API.
For discussion of topics applicable to both the C++ and Py APIs, please use the parent forum.
kinkersnick
Posts: 2
Joined: Mon Mar 10, 2014 4:15 pm

Setting up on a Mac

Postby kinkersnick » Tue Mar 11, 2014 8:33 am

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:

Check dependencies
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_datatypes.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_light.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_mesh.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_particles.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_progress.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_render_saving.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_shader.hpp' of type sourcecode.cpp.h for architecture x86_64
warning: no rule to process file '/Volumes/Alaya/xxxUSERxxx/Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_transformation.hpp' of type sourcecode.cpp.h for architecture x86_64

CompileC /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Objects-normal/x86_64/main.o Another\ Krack/main.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
cd "/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack"
setenv LANG en_US.US-ASCII
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=gnu++11 -stdlib=libc++ -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Werror=return-type -Werror=deprecated-objc-isa-usage -Werror=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.8 -g -fvisibility-inlines-hidden -Wno-sign-conversion -iquote /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Another\ Krack-generated-files.hmap -I/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Another\ Krack-own-target-headers.hmap -I/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Another\ Krack-all-target-headers.hmap -iquote /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Another\ Krack-project-headers.hmap -I/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Products/Debug/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/DerivedSources/x86_64 -I/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/DerivedSources -F/Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Products/Debug -MMD -MT dependencies -MF /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Objects-normal/x86_64/main.d --serialize-diagnostics /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Objects-normal/x86_64/main.dia -c /Volumes/Alaya/xxxUSERxxx/Documents/Personal\ Projects/Krakatoa/Another\ Krack/Another\ Krack/main.cpp -o /Volumes/Alaya/xxxUSERxxx/Library/Developer/Xcode/DerivedData/Another_Krack-gxyxkrmvnwtfrpbtfpbmpsjjthdg/Build/Intermediates/Another\ Krack.build/Debug/Another\ Krack.build/Objects-normal/x86_64/main.o

/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:10: error: 'krakatoasr_renderer.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_renderer.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_renderer.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:10:10: error: 'krakatoasr_transformation.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_transformation.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_transformation.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:10:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_transformation.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:11:10: error: 'krakatoasr_particles.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_particles.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_particles.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:11:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_particles.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_particles.hpp:10:10: error: 'krakatoasr_transformation.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_transformation.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_transformation.hpp"
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_particles.hpp:11:10: error: 'krakatoasr_mesh.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_mesh.hpp>
^~~~~~~~~~~~~~~~~~~~~
"krakatoasr_mesh.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:11:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_particles.hpp:11:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_mesh.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:12:10: error: 'krakatoasr_mesh.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_mesh.hpp>
^~~~~~~~~~~~~~~~~~~~~
"krakatoasr_mesh.hpp"
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:13:10: error: 'krakatoasr_shader.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_shader.hpp>
^~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_shader.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:13:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_shader.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:14:10: error: 'krakatoasr_light.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_light.hpp>
^~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_light.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:14:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_light.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:15:10: error: 'krakatoasr_progress.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_progress.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_progress.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:15:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_progress.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:16:10: error: 'krakatoasr_render_saving.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_render_saving.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_render_saving.hpp"
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/Another Krack/main.cpp:12:
In file included from /Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_renderer.hpp:16:
/Volumes/Alaya/xxxUSERxxx/Documents/Personal Projects/Krakatoa/Another Krack/../../../../Downloads/KrakatoaSR_API_2.2.0.51871_Windows_Linux_OSX/include/krakatoasr_render_saving.hpp:9:10: error: 'krakatoasr_datatypes.hpp' file not found with <angled> include; use "quotes" instead
#include <krakatoasr_datatypes.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
"krakatoasr_datatypes.hpp"
18 errors generated.
[/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

User avatar
Conrad Wiebe
Posts: 777
Joined: Wed Aug 15, 2007 12:24 pm
Location: Thinkbox Software

Re: Setting up on a Mac

Postby Conrad Wiebe » Tue Mar 11, 2014 4:35 pm

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:

    Code: Select all

    -I/path/to/krakatoasr/include/
  • In main.cpp, add:

    Code: Select all

    #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:

    Code: Select all

    -L/path/to/krakatoasr/lib-osx-x64/ -lKrakatoaSR
  • In main.cpp, add this to the main function:

    Code: Select all

    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.
Conrad Wiebe
Software Development Manager
Thinkbox Software

kinkersnick
Posts: 2
Joined: Mon Mar 10, 2014 4:15 pm

Re: Setting up on a Mac

Postby kinkersnick » Tue Mar 18, 2014 12:29 pm

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

Thanks!


Return to “Krakatoa SR C++ API”

Who is online

Users browsing this forum: No registered users and 2 guests