Using Visual studio with Cinder


#1

Hi,
Im new to Cinder and would like to use Visual Studio with Cinder.
I started with this link https://libcinder.org/docs/guides/windows-setup/index.html but was unable to open the sample image with visual studio 2013.
How do I go about compiling with Visual studio?

Thanks


#2

Well it’s always nice to use git, even for your own projects. So this is how I do it:

  • Install git
  • Install MS Visual Studio C++ (I have the 2017 version).
  • clone the cinder repository:
    git clone --recursive https://github.com/cinder/Cinder.git
  • go to the Cinder folder
  • open proj/vc2015/cinder.sln
  • accept to upgrade project’s compiler version to v141
  • compile the project for the versions you want to use, usually Debug and Release both x64 and x86(win32).
    now you can test any of the projects in the samples folder.

If you use another version of Visual Studio this might also work. If you downloaded the released version of Cinder from the website just open the cinder.sln and compile it with the version of Visual Studio that you have.


#3

Hi,
I was trying to open VC2013/cinder.sln in my visual studio 2017 but i kept getting errors while compiling.
Am i supposed to add any dependencies?
Untitled|690x388


#4

With 2017 I think it’s better to use the latest git version and use the one in the vc2015 folder.


#5

I usually copy the Cinder vc2015 folder to a new vc2017 so I can keep updating from git repo without conflicts.
Same for blocks, samples…


#6

I used the Vc2015 in my 2017 visual studio and tried compiling but there these errors popping up.
So i was wondering if i need to do any additional steps?

Thanks


#7

This so question might be useful.


#8

I reintalled my visual studio.
I dont get any errors but it shows build failed.


#9

Could you please post the build output?


#10

I tried instaling Windows sdk10. I ended up with errors when i opened the sample project and when I compiled it too.


#11

What version of cinder are you compiling? The git version should compile just with a regular Visual Studio C++ 2017 install.


#12

Im compiling vc2015 from the cinder folder.
And i used the regular 2017 VS.

When i compiled it again few mins ago, it comes as build failed but its not showing me any errors


#13

I see you are building Debug_Angle, select just Debug.


#14

I

I used just debug and tried both X64 and win32.
it doesnt build and but this time it has no errors :confused:

I tried even reinstalling VS sigh.
Maybe i should just try in another pc


#15


I tried with a different pc but im getting too many errors this time.


#16

Hi Nihara,

sorry to hear you’re still struggling with this. In your latest screenshot, it looks like you’re missing the boost library. I assume you’re using Cinder’s Git version? When cloning the repository, make sure to also update its submodules. A repository contains all files necessary to compile and build an application. Sometimes it depends on another repository (in this case the boost library), which is then added as a “linked repository” called a submodule. The easiest way to download all of that is when cloning Cinder like this:

git clone --recursive git://github.com/cinder/Cinder.git cinder_master

If you want to update the submodules afterwards, open a command window, browse to the root of your cinder folder and run:

git submodule update --init --recursive

See also this guide, which describes everything in more detail. I should mention that the guide was written with VS2013 in mind. When using VS2015 and above, open the cinder project file in the vs2015 folder. The name and location of the cinder.lib file have been changed, too. See this old post with a description.

-Paul