Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why do we need to compile opencv with cMake

I just got an internship and I was tasked to generate dll files from c++ class and function definitions that call to the opencv library. At first, I just wanted to follow the instructions to install opencv on windows and move on since I thought the task itself is pretty straightforward, but then I got hit with some serious looking error messages when I tried to "compile" c++ opencv (step 6.1 in this tutorial). Python opencv is just a bunch of shell commands away, but the c++ library is a nightmare especially that it involves working with visual studio which, on its own, is pain to get to work properly. I want to be able to debug the errors from the compiling phase and for that I need to know why the special treatment for the c++ library compared to the python one? Why do I need to compile opencv and why does it need to be done with cmake? Does pip install opencv-contrib-python also compile opencv behind the scene? Is that systematic for all libraries? Thank you, please go easy on me I'm still a newb. I followed this tutorial but it teaches how to install opencv per project, so is that it? Does compiling allow you to add opencv globally?

Why do we need to compile opencv with cMake

I just got an internship and I was tasked to generate dll files from c++ class and function definitions that call to the opencv library. At first, I just wanted to follow the instructions to install opencv on windows and move on since I thought the task itself is pretty straightforward, but then I got hit with some serious looking error messages when I tried to "compile" c++ opencv (step 6.1 in this tutorial). Python opencv is just a bunch of shell commands away, but the c++ library is a nightmare especially that it involves working with visual studio which, on its own, is pain to get to work properly. I want to be able to debug the errors from the compiling phase and for that I need to know why the special treatment for the c++ library compared to the python one? Why do I need to compile opencv and why does it need to be done with cmake? Does pip install opencv-contrib-python also compile opencv behind the scene? Is that systematic for all libraries? Thank you, please go easy on me I'm still a newb. I followed this tutorial but it teaches how to install opencv per project, so is that it? Does compiling allow you to add opencv globally?