Hi, I built opencv from source and I'm trying to make a dll that uses some of the opencv .lib.
In visual studio I set the additional directory and dependencies as follows (.lib files are in that folder):
<AdditionalLibraryDirectories>[...]\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<additionaldependencies>opencv_core410.lib;opencv_imgcodecs410.lib;opencv_imgproc410.lib;%(AdditionalDependencies)</additionaldependencies>
When I build it I get these errors:
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "class cv::debug_build_guard::_InputOutputArray const & __cdecl cv::noArray(void)" (?noArray@cv@@YAAEBV_InputOutputArray@debug_build_guard@1@XZ) referenced in function "bool __cdecl ip::createStitchedImage(char *,char *,int * const,int * const,int,bool)" (?createStitchedImage@ip@@YA_NPEAD0QEAH1H_N@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "public: void __cdecl cv::Mat::copyTo(class cv::debug_build_guard::_OutputArray const &)const " (?copyTo@Mat@cv@@QEBAXAEBV_OutputArray@debug_build_guard@2@@Z) referenced in function "bool __cdecl ip::createStitchedImage(char *,char *,int * const,int * const,int,bool)" (?createStitchedImage@ip@@YA_NPEAD0QEAH1H_N@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "public: void __cdecl cv::Mat::convertTo(class cv::debug_build_guard::_OutputArray const &,int,double,double)const " (?convertTo@Mat@cv@@QEBAXAEBV_OutputArray@debug_build_guard@2@HNN@Z) referenced in function "public: class cv::Mat_<float> & __cdecl cv::Mat_<float>::operator=(class cv::Mat &&)" (??4?$Mat_@M@cv@@QEAAAEAV01@$$QEAVMat@1@@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "void __cdecl cv::bitwise_not(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_InputArray const &)" (?bitwise_not@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@0@Z) referenced in function "bool __cdecl ip::createStitchedImage(char *,char *,int * const,int * const,int,bool)" (?createStitchedImage@ip@@YA_NPEAD0QEAH1H_N@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "bool __cdecl cv::imwrite(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<int,class std::allocator<int> > const &)" (?imwrite@cv@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@AEBV?$vector@HV?$allocator@H@std@@@3@@Z) referenced in function "bool __cdecl ip::MakeTransparentImage(char *,char *)" (?MakeTransparentImage@ip@@YA_NPEAD0@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "bool __cdecl cv::imencode(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class cv::debug_build_guard::_InputArray const &,class std::vector<unsigned char,class std::allocator<unsigned char> > &,class std::vector<int,class std::allocator<int> > const &)" (?imencode@cv@@YA_NAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV_InputArray@debug_build_guard@1@AEAV?$vector@EV?$allocator@E@std@@@3@AEBV?$vector@HV?$allocator@H@std@@@3@@Z) referenced in function "void __cdecl ip::MakeTransparentImage(char *,unsigned char * *,int *)" (?MakeTransparentImage@ip@@YAXPEADPEAPEAEPEAH@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "void __cdecl cv::GaussianBlur(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,class cv::Size_<int>,double,double,int)" (?GaussianBlur@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@V?$Size_@H@1@NNH@Z) referenced in function "bool __cdecl ip::applyRotationAndScale(class cv::Mat &,int,int,bool)" (?applyRotationAndScale@ip@@YA_NAEAVMat@cv@@HH_N@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "void __cdecl cv::warpAffine(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::Size_<int>,int,int,class cv::Scalar_<double> const &)" (?warpAffine@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@0V?$Size_@H@1@HHAEBV?$Scalar_@N@1@@Z) referenced in function "bool __cdecl ip::applyRotationAndScale(class cv::Mat &,int,int,bool)" (?applyRotationAndScale@ip@@YA_NAEAVMat@cv@@HH_N@Z)
1>ImageProcessing.obj : error LNK2019: unresolved external symbol "void __cdecl cv::cvtColor(class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,int,int)" (?cvtColor@cv@@YAXAEBV_InputArray@debug_build_guard@1@AEBV_OutputArray@31@HH@Z) referenced in function "bool __cdecl ip::convertImageToBW1b(class cv::Mat &,class cv::Mat &,int,int,int,bool)" (?convertImageToBW1b@ip@@YA_NAEAVMat@cv@@0HHH_N@Z)
Am I missing a dependency?
Any help is appreciated!