Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

include <opencv2 core="" core.hpp="">

include<opencv2 core="" mat.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include"opencv2/opencv.hpp"

include"opencv2/highgui/highgui.hpp"

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

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

include <opencv2 core="" core.hpp="">

include<opencv2 core="" mat.hpp="">

include <opencv2 highgui="" highgui.hpp="">

include"opencv2/opencv.hpp"

include"opencv2/highgui/highgui.hpp"

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