Can not compile: Found OpenCV Windows Pack but it has no binaries compatible, BUT I use linux
I'm new to opencv.
I followed the installation instruction for LINUX . I chose to install from the page on SourceForge. (SO NOW I have opencv-3.1.0 in my HOME directory) I continued all the steps in the instruction.
When executing cmake I put CMAKE_INSTALL_PREFIX= the directory of my "release" folder.
Then I moved on to the next tutorial on "Using OpenCV with gcc and cmake"
BUT when cmake .
I got ERROR:
CMake Warning at /home/osboxes/opencv-3.1.0/cmake/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:3 (find_package)
AND SO ON....
- I use LINUX, and pretty sure I donwloaded the opencv for linux. So why it says windows pack?
- The tutorial doesn't tell me where to put DIsplayImage.cpp and CMakeLists.txt I make a new folder called OpenCVTutorial in my home, and put them inside, on in the same directory.. Is that okay?
- How to fix it?
did you build the opencv libs, using cmake, first ?
imho, you're missing this
Hi @berak , do you mean during installation tutorial OR during the displayimage.cpp tutorial?
During the installation. I did
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=path to my release folder
^ This one i put it into path to my release folder because I don't know where to set to, and according to OpenCV by example book, it is so. Should I set it to /usr/local instead?
During the displayimage.cpp tutorial , I did
cmake .
I just followed the tutorial @berak
the sourceforge packages contain only binaries for windows. (you should have rather got github src)
before you can start any tutorial, you have to build the opencv libs for your system.
@berak Can you suggest which instruction should I follow to build opencv libs and install opencv?
@berak I already followed the installation tutorial for Linux. I thought it did it
on linux, you should not touch CMAKE_INSTALL_PREFIX at all. it will default to /usr/local, and everything will be fine.
(pointing it to the windows release folder was probably a bad idea)
@berak In the installation insturction page, it says "Create a temporary directory which we denote as <cmake_binary_dir> (let's say release), where you want to put the generated Makefiles, project files as well the object files and output binaries."
I create it inside the folder that I cloned?
Later when I make my own project/ code, do I put it inside the release folder??
this is the temporary build folder, not the install one. if building & installing the opencv libs went well, you can entirely discard it (~2gb !)
for your own project , you only need the installed libs / headers / so's, nothing from the build folder.
@berak so you're saying that I can erase the opencv folder in my HOME directory?