Friday, August 23, 2019

Visual Studio specifics of OpenCV project with Spinnaker SDK

This is linked to my previous post about the QHY -> Spinnaker implementation, the nitty-gritties of Visual Studio project changes required under Windows.

  1. The SDK and examples installed by default under Program Files in C:. If Visual Studio opens the examples there, it complains that the directory is not writable. So, make a copy, including the entire spinnaker directory - not just the src folder, since the include paths in the examples are set as ..\..\include and similarly for libs.
  2. In my case, since I had VS2017, I had to install the VS2015 toolset as mentioned in my previous post, and when opening the solution, choose the "No Upgrade" option for these projects.
  3. Once these steps were done, I could compile and run the examples. But for my project, I had to create a new project, choose the V140 toolset, add libraries, add include and lib paths, and also prevent errors due to my use of sprintf.


  4. One way would have been to make a copy of the common properties file which I had made earlier, make modifications to it, and add that to the project. In this case, I just made specific changes to the Release configuration of this particular project.
  5. Additional include dir in C/C++ -> General, Additional Include Directories would be a better place to add it than in this screenshot.


  6. Linker -> Input -> Additional Dependencies


  7. Additional Library Directories.

I would probably need to copy the dlls manually, or follow the post build steps mentioned at this earlier post

No comments:

Post a Comment