c++ - opencv 3.0.0 linker error when instantiating Mat object -
i'm trying compile simple opencv program. i've set environment variables , set c++ additional include dir of project additional linker directory , input dependencies (opencv_ts300d.lib , opencv_world300d.lib) keep getting linker's error code :
#include<iostream> #include<opencv2\opencv.hpp> #include<cstdio> #include <string> #include <opencv2\core\core.hpp> #include <opencv2\imgcodecs.hpp> #include <opencv2\highgui\highgui.hpp> using namespace std; using namespace cv; int main(int argc, char** argv) { cv::mat a; return 0; }
the errors following :
translated:
error 1 error lnk2019: unresolved external symbol "void __cdecl >cv::fastfree(void *)" (?fastfree@cv@@yaxpax@z) referenced in function "public: >__thiscall cv::mat::~mat(void)" (??1mat@cv@@qae@xz) c:\users\sergio\documents\visual studio 2013\projects\opencvtest\opencvtest\origine.obj opencvtest
error 2 error lnk2019: unresolved external symbol "public: void >__thiscall cv::mat::deallocate(void)" (?deallocate@mat@cv@@qaexxz) referenced >in function "public: void __thiscall cv::mat::release(void)" (?>release@mat@cv@@qaexxz) c:\users\sergio\documents\visual studio 2013\projects\opencvtest\opencvtest\origine.obj opencvtest
original:
errore 1 error lnk2019: riferimento al simbolo esterno "void __cdecl cv::fastfree(void *)" (?fastfree@cv@@yaxpax@z) non risolto nella funzione "public: __thiscall cv::mat::~mat(void)" (??1mat@cv@@qae@xz) c:\users\sergio\documents\visual studio 2013\projects\opencvtest\opencvtest\origine.obj opencvtest
errore 2 error lnk2019: riferimento al simbolo esterno "public: void __thiscall cv::mat::deallocate(void)" (?deallocate@mat@cv@@qaexxz) non risolto nella funzione "public: void __thiscall cv::mat::release(void)" (?release@mat@cv@@qaexxz) c:\users\sergio\documents\visual studio 2013\projects\opencvtest\opencvtest\origine.obj opencvtest
when happened me, linking x64 versions of of opencv library attempting compile x86 (win32) application. changing 32 bit 64 bit application made mine work.
Comments
Post a Comment