Can not compile: Found OpenCV Windows Pack but it has no binaries compatible, BUT I use linux

asked 2016-09-29 01:06:47 -0600

alienmon gravatar image

updated 2016-09-29 01:08:18 -0600

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....
  1. I use LINUX, and pretty sure I donwloaded the opencv for linux. So why it says windows pack?
  2. 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?
  3. How to fix it?
edit retag flag offensive close merge delete

Comments

did you build the opencv libs, using cmake, first ?

imho, you're missing this

berak gravatar imageberak ( 2016-09-29 01:13:04 -0600 )edit

Hi @berak , do you mean during installation tutorial OR during the displayimage.cpp tutorial?

alienmon gravatar imagealienmon ( 2016-09-29 01:15:03 -0600 )edit

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

alienmon gravatar imagealienmon ( 2016-09-29 01:18:05 -0600 )edit
1

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 gravatar imageberak ( 2016-09-29 01:19:28 -0600 )edit

@berak Can you suggest which instruction should I follow to build opencv libs and install opencv?

alienmon gravatar imagealienmon ( 2016-09-29 01:21:05 -0600 )edit

@berak I already followed the installation tutorial for Linux. I thought it did it

alienmon gravatar imagealienmon ( 2016-09-29 01:22:50 -0600 )edit

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 gravatar imageberak ( 2016-09-29 01:31:46 -0600 )edit

@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??

alienmon gravatar imagealienmon ( 2016-09-29 01:38:18 -0600 )edit

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 gravatar imageberak ( 2016-09-29 01:44:19 -0600 )edit

@berak so you're saying that I can erase the opencv folder in my HOME directory?

alienmon gravatar imagealienmon ( 2016-09-29 02:04:27 -0600 )edit