I want to use this plug-in for Visual Studio Visual C++ for Linux Development to develop applications for the Raspberry Pi with code generated from another computer using Visual Studio.

In my laptop (Win 8.1, VS2015) I have OpenCV 3.4.2 installed and working using Visual C++.

In the Raspberry (Raspbian Jessie, CLI) I have OpenCV 3.4.2 installed and working using Python 3.4

Which libraries I have to put in linker and aditional libraries to setup the project in Visual Studio?

  • Are you developing on PC ? If so take a look at TCF ( Target Communication Framework)I am running it on Ubuntu using Eclipse (C++) and cross-compiling it to RPi.Little convoluted but working OK. I'll be adding OpenCV soon. – Jan Hus Aug 25 '18 at 1:20
  • Yes, I'm developing on PC. I would rather stay working with Visual Studio – Mr. C Aug 27 '18 at 15:23
  • I may get a ding for saying this - so what is the real term for developing / compiling on Windows OS and then moving the Windows .exe to Linux?Sorry for not addressing the original question. – Jan Hus Aug 27 '18 at 18:27

I don't know if this is still helpful, but I encountered this problem too so it might be helpful to others new to the IDE and computing in general.

I first downloaded the OpenCV libraries onto raspberry pi via SSH following this tutorial - https://docs.opencv.org/3.4/d7/d9f/tutorial_linux_install.html

Then on the right hand side of the visual studio interface, I right click on the solution explorer and clicked properties at the very bottom.

from there, go Linker->Input->Library Dependencies.

In the box, paste:


eg. if you want to use the wiring pi library (After installing on the raspberry pi FIRST), you add 'wiringPi;' to the end of that string above.

click ok, then you're done.

The libraries can be 'accessed' with:

#include <opencv2/core(or whatever other name).hpp>

I encountered a problem where the opencv2 folder was nested in opencv4, the directory therefore was on my pi - usr/local/include/opencv4/opencv2/…

however, because in the 'sub' libraries of OpenCV, they include other libraries with the directory of opencv2/… , and not opencv4/opencv2/… so there were errors. So I moved the folder opencv2 to the usr/local/include directory and deleted opencv4 directory. And now it works.

I don't know if the problem is isolated to me (I made mistake while installing) or it may occur to you.

Hope this helps!

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.