Downloading, compiling and installing opencv 2.3 with dev c++??

So i downloaded the opencv 2.3 superpack from the official site and extracted all the files. However later on in the install guide it says to download Cmake to compile the binaries because it is the only way to compile them now.

I got Cmake installed. Im just unsure exactly how to use cmake and what binaries i am compiling. In the directions it says to go to configure and make any adjustments rather vaguely but i am unsure exactly what to do. It gives the option of choosing a compiler but it doesn't list the compiler i am using....so i am lead to beleive you can't use v2.3 with dev-c++. edit: i tried using code::blocks as the compiler and it didn't work whatsoever. If i download MinGW as the compiler to build the cmake files will i be able to use them with my dev-c++ compiler in my custom programs?? I would really like to be able to use the latest version if i can. But will i have to use version 2.2 or an earlier version?? I have the latest versions of code::blocks and dev-c++ and version 2.3 and 2.2 of opencv.

Im not sure if the earlier versions require the use of cmake to compile the cmake files but if so i will prolly need help. Im beginning to think i will need an eariler version of opencv installed. I guess when selecting the source code i will just select the folder all the source cmake files are. Then for where they are built into i will select where my other header files and other support files are for dev-c++ that way i can link and include them from the same directory within my custom projects.....correct???

here is the link to the opencv installation guide.
http://opencv.willowgarage.com/wiki/InstallGuide
Last edited on
Lol nobody on these forums has anything when it comes to opencv. And sadly i dont think the official website has a forum. I've found a couple tutorials that show how to accomplish what im trying to do but it is for Linux/unix. Thanks in advance if anyone has any recommendations.
Run the cmake gui, put the path to source and the path to where you want the binaries and click configure. It should give options to choose code-blocks, visual studio, etc...

This is according to the install guide, I don't have much experience with OpenCV myself.
Last edited on
That is what i was doing but i get the error "Error in configuration process, project file may be invalid" I'm not really sure what is wrong. here is the compete error documentation.

CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module file:C:/Users/1234/Desktop/New folder (2)/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module file:C:/Users/1234/Desktop/New folder (2)/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Configuring incomplete, errors occurred!

it seems like everything is wrong. I may be selecting the compiler wrong for one. I have code::blocks but i beleive i had to download a seperate compiler and link it to code::blocks since it didn't have one built in. I want to download the MinGW compiler but i dont want to follow vague instructions then have another GB of unecessary programs installed on my computer. I dont beleive i built Cmake. I'm pretty sure i just downloaded a zip file and ran the installation because it is in "my programs" and i downloaded it from the official site. In these errors i dont see what i could of done wrong seeing as i did only what i could....which was install it per directions.
Last edited on
Did you add cmake to your path? FWIW OpenCV comes with pre-built vs2008 and 2010 binaries which should be easier to setup, I just did it in about 10 - 15 minutes.
I'm not sure which path you are referring to. Now that you mentioned it i looked under build and i do have some hpp files that are the "header file" type. I looked under build and in the include file then under Opencv (confusingly enough there is multiple Opencv folders within the opencv folder) it had a bunch of folders each containing single or multiple hpp files.....I would just link these like a regular ".h" file? I have v2.3. I'm guessing i'll just add these to where i have my other header files i include in my projects that way i can include them from the same directory. Then i should be able to work with opencv? But the official site claimed i needed to compile certain makefiles...which is why i never noticed the hpp files to begin with. So i don't have to compile anything since i have these pre-built headers?
Last edited on
No, the headers aren't enough. you need to link to the library files (dll or lib). By path I mean the system path environment variable. If you use windows 7, right click computer, select properties, then advanced settings and environment variables. Edit path, and add C:\Program Files (x86)\CMake 2.8\;C:\Program Files (x86)\CMake 2.8\bin\ note where you have cmake installed my be different.
Last edited on
I didn't see any lib's or dll's....which takes me back to my first problem its not compiling. Cmake is in my program files the exact path you mentioned. It is just getting the Cmake files (the ones that i unizipped from opencv) to be compiled by cmake so i can use opencv in my project. It gives me all those errors. I am gonna have to get the MinGW compiler installed to be able to use it with cmake. I browsed to the location of the cmake files in opencv. So i dont see why cmake is telling me the project files may be invalid when i try to configure them. I just need to get the Lib's and dll's now.

edit: on second glance there is a bunch of lib.a files but these are all third party and there is a whole plethora of them.
Last edited on
.
Last edited on
Ok, did you add cmake to your PATH? If you don't you will continue to get errors. Also, you should note cmake DOES NOT compile, it generates makefiles to be built by your compiler.
Last edited on
Topic archived. No new replies allowed.