I want to use the opencv library with code::blocks.
I am using windows 7 Pro x86 os. I've installed Code::Blocks 13.12.
I've download and extract opencv library on my disk (C:\Opencv242).
I also have opencv 2.4.9 and some other versions.
I already tried so much method. I never compilied succesfully. Every time it get me some errors.
Like;
for this code:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;
int main()
{
Mat img = imread("C:\\PROJELER\\Software Projects\\Opencv\\pic.jpg", CV_LOAD_IMAGE_COLOR);
namedWindow("MyWindow", CV_WINDOW_AUTOSIZE);
imshow("MyWindow", img);
waitKey(0);
return 0;
}
It getting theese errors to me;
||=== Build: Debug in Opencv (compiler: GNU GCC Compiler) ===| obj\Debug\main.o||In function
main':| C:\PROJELER\Software Projects\Opencv\main.cpp|12|undefined reference to
cv::imread(std::string const&, int)'| C:\PROJELER\Software Projects\Opencv\main.cpp|14|undefined reference tocv::namedWindow(std::string const&, int)'| C:\PROJELER\Software Projects\Opencv\main.cpp|15|undefined reference to
cv::_InputArray::_InputArray(cv::Mat const&)'| C:\PROJELER\Software Projects\Opencv\main.cpp|15|undefined reference tocv::imshow(std::string const&, cv::_InputArray const&)'| C:\PROJELER\Software Projects\Opencv\main.cpp|17|undefined reference to
cv::waitKey(int)'| obj\Debug\main.o||In functionZN2cv3MatD1Ev':| C:\PROJELER\Software Projects\Opencv\..\..\..\Opencv242\opencv\build\include\opencv2\core\mat.hpp|278|undefined reference to
cv::fastFree(void*)'| obj\Debug\main.o||In functionZN2cv3Mat7releaseEv':| C:\PROJELER\Software Projects\Opencv\..\..\..\Opencv242\opencv\build\include\opencv2\core\mat.hpp|367|undefined reference to
cv::Mat::deallocate()'| ||=== Build failed: 7 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
I want to clean install.But i dont know how.
I followed so many person.Last I tried this one;
http://kevinhughes.ca/tutorials/opencv-install-on-windows-with-codeblocks-and-mingw/
I still cant compiling.
Can any one help me how is this?Which way is the right one?
Thanks all of you.
I hope some one help and somehow this problem is solve.