Ask Your Question

Ahsan's profile - activity

2017-05-27 13:50:41 -0500 received badge  Taxonomist
2014-11-26 05:07:20 -0500 received badge  Famous Question (source)
2014-07-28 21:41:20 -0500 received badge  Student (source)
2014-02-06 19:11:39 -0500 received badge  Notable Question (source)
2013-10-19 23:44:26 -0500 received badge  Popular Question (source)
2012-12-26 05:44:22 -0500 received badge  Editor (source)
2012-12-26 05:43:40 -0500 asked a question undefined reference to `cv::imread(std::string const&, int)'

Hello I am using OpenCV 2.4.3 with MinGW using Netbeans. I am testing a simple program but I am unable to compile. The error is /*********/ build/Debug/MinGW-Windows/main.o: In function main': C:\Users\Ahsan\Desktop\ImageProcessing/main.cpp:16: undefined reference tocv::imread(std::string const&, int)' build/Debug/MinGW-Windows/main.o: In function ~Mat': c:/Users/Ahsan/Desktop/opencv/build/include/opencv2/core/mat.hpp:278: undefined reference tocv::fastFree(void)' build/Debug/MinGW-Windows/main.o:c:/Users/Ahsan/Desktop/opencv/build/include/opencv2/core/mat.hpp:298: undefined reference to cv::Mat::copySize(cv::Mat const&)' build/Debug/MinGW-Windows/main.o:c:/Users/Ahsan/Desktop/opencv/build/include/opencv2/core/mat.hpp:367: undefined reference tocv::Mat::deallocate()' collect2: ld returned 1 exit status /**********/ Can you please help me. My program is

int main(int argc, char** argv) { cv::Mat image; image = imread(argv[1], CV_LOAD_IMAGE_COLOR); return 0; }