Info Lectures Assignments Office Hours Hall of Fame Notes
Info Lectures Assignments Office Hours Hall of Fame Notes

Cinder Installation Guide

For the next project after C++ TicTacToe, we will begin to use a framework called Cinder that will enable you to create graphical user interfaces in C++.

  1. Download Cinder (v0.9.2) for your platform. Create a folder named Cinder and extract the downloaded item into it. We’ll call this folder ~/Cinder throughout the instructions (where ~ represents the higher level directories that contains Cinder folder)

    • https://libcinder.org/download
    • If your directory structure looks like ~/Cinder/cinder_0.9.2_vc2015, then, you should get rid of the outer folder and refer to the inner folder as ~/Cinder
  2. Open the ~/Cinder folder in CLion and click the green build button. This will build libcinder. You only need to do this once per machine. This build might take a while.

  3. Open ~/Cinder/samples/BasicApp in a NEW PROJECT WINDOW in CLion and click the run button. A window should pop up, and you should be able to draw a line in the window using your mouse.

    • If you are not able to click on the run button, it means the CMake project hasn’t loaded. Open the BasicApp.cpp file under the src/ directory. You should see a warning that says CMake project isn't loaded. Select CMakeLists.txt file. Click on Select CMakeLists.txt file and select the file at BasicApp/proj/cmake/CMakeLists.txt

    • MacOS users: It’s possible that you may come across a Permission denied error. In this case, try doing: Edit configurations -> Executable -> Select Other -> Find samples/BasicApp/proj/cmake/cmake-build-debug/Debug/BasicApp/BasicApp/Contents/MacOS/BasicApp, and then click run again.

If you get fatal errors while building cinder like the screenshot below, add `#include <unistd.h>` at the top of all files which have a fatal error (for the image below, add it in gzlib.c, gzread.c and gzwrite.c)

If you're using Ubuntu, you can follow the instructions here instead of the instructions above.

  1. Congratulations! You have Cinder working! Now you can check out this video about how cinder works and start building cool stuff.