Problem with blocks in VS2015


#1

Hello! I’m a Cinder newbie and quite frankly C++ newbie as well. Through some hurdles I have succesfully built and run Cinder samples, and I’m loving it! I’m having some trouble with ui Cinderblocks though (XUI and imGui) . I can’t build anything that uses blocks. I get various file not found and unresolved external symbol errors. Reason I’m asking here instead of block’s github pages is that I believe I have something wrong with my setup. I have pulled blocks via git and updated subrepositories, and Tinderbox ain’t helping either.

Is there something specific I should do, ie. rebuild Cinder after installing Blocks?


#2

Hi,

it could very well be that most blocks haven’t added support for VS2015 yet, simply because Cinder does not officially support it yet (support for VS2015 is coming soon, though, and in most cases you should be able to just compile Cinder with 2015’s toolset v140 - I also know Cinder has been tested on VS2017 as well).

For now, you may want to go ahead and install the officially supported toolset v120, which comes with VS2013. You could try to simply install VS2013 on your setup, alongside VS2015. I even believe that you can then remove it again and the toolset will not be uninstalled. Not sure about that, though. And some people have reported problems with the installation.

With that being said, here’s how you’d download and install Cinder + blocks on a new machine:

  1. Install a Git client for your platform.
    On Windows, I use this one. Make sure to enable the command line tool during setup:

  2. Clone the Cinder repository.
    On the command line, type:
    git clone --recursive https://github.com/cinder/Cinder.git cinder_master

  3. Clone the blocks you want to the blocks folder of Cinder:
    cd cinder_master
    cd blocks
    git clone --recursive https://github.com/paulhoux/Cinder-Warping.git Cinder-Warping

  4. Install Visual Studio 2013 as a minimum. Visual Studio 2015 has a better IDE and improved support for C++ language features, but is not yet officially supported. You can find installers here.

  5. Compile Cinder by opening the project file ./cinder_master/vc2013/cinder.vxproj. Do not upgrade the project to VS2015 (toolset v140), as this will/might break the project.

  6. To use a block in your own projects, use TinderBox to create the project for you. When opening it, do not upgrade to toolset v140.

  7. It’s usually a good idea to add Cinder to your solution. Don’t forget to set Cinder as a dependency for your own project.

Note: it’s important to clone the repositories recursively, as this will download all required submodules as well (boost, TinderBox, etc.) To manually update submodules, use the git command:
git submodule update --init --recursive

-Paul