Ask Your Question
0

cv::Mat Error(mat.hpp)

asked 2012-07-07 07:59:31 -0600

genetica gravatar image

Goodday

I keep receiving Undefined reference errors on functions such as cv::Mat::copyTo and other in mat.hpp.

Basically my opecv works perfectly except when I declare cv::Mat. I had OpenCV2.2 then upgraded to openCV2.4 but the error persists with cv::Mat. Can someone please assist me.

Regards

PS. Running MinGw and CodeBlocks in Windows 7.

edit retag flag offensive close merge delete

Comments

icedecker: In Opencv2.2 no matter what I do I get the same error, but none the less I moved to OpenCV2.4.2 correcting the includes solved the cv::Mat error but now I get a "The procedure entry points _ZNSt8 _detail15 List _node _base11 _M _transferEPS0 _ S1 could not be located in the dynamic link library libstdc++-6.dll"

I am trying to compile the code find_obj.cpp which appears in the Opencv2.2 samples. I recently updated my MinGW to version 3.18 and gcc to version 4.5.2. Any suggestions?

genetica gravatar imagegenetica ( 2012-07-07 17:31:19 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2012-07-07 12:11:08 -0600

icedecker gravatar image

You need to provide more information. But let me ask a question... How is your include? If they are like it:

#include <cv.h>
#include <highgui.h>

You need to change the includes to

#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>

And other includes, if you need to use specific functions of opencv. And use the namespace cv. Does it solves your problem?

Also take a look in the name of libraries and include in CodeBlocks. They also changed. See the changelog of version 2.2 to see which libraries to include, for example opencv_core, opencv_highgui, etc.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-07 07:59:31 -0600

Seen: 2,760 times

Last updated: Jul 07 '12