When I ran detect_markers.cpp I got such errors, but it seemed that I have already included the header file for opencv4(the aruco header file were downloaded from this link https://github.com/opencv/opencv_contrib/tree/master/modules/aruco/include/opencv2), added the path of the additional library directories, and the additional dependencies(opencv_world400d.lib for the debug and opencv_world400.lib for the release). Did I miss anything? Thanks for any help.
Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "struct cv::Ptr<class cv::aruco::dictionary=""> __cdecl cv::aruco::getPredefinedDictionary(enum cv::aruco::PREDEFINED_DICTIONARY_NAME)" (?getPredefinedDictionary@aruco@cv@@YA?AU?$Ptr@VDictionary@aruco@cv@@@2@W4PREDEFINED_DICTIONARY_NAME@12@@Z) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK2019 unresolved external symbol "public: static struct cv::Ptr<struct cv::aruco::detectorparameters=""> __cdecl cv::aruco::DetectorParameters::create(void)" (?create@DetectorParameters@aruco@cv@@SA?AU?$Ptr@UDetectorParameters@aruco@cv@@@3@XZ) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::aruco::detectMarkers(class cv::debug_build_guard::_InputArray const &,struct cv::Ptr<class cv::aruco::dictionary=""> const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_OutputArray const &,struct cv::Ptr<struct cv::aruco::detectorparameters=""> const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &)" (?detectMarkers@aruco@cv@@YAXAEBV_InputArray@debug_build_guard@2@AEBU?$Ptr@VDictionary@aruco@cv@@@2@AEBV_OutputArray@42@2AEBU?$Ptr@UDetectorParameters@aruco@cv@@@2@200@Z) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::aruco::estimatePoseSingleMarkers(class cv::debug_build_guard::_InputArray const &,float,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_OutputArray const &,class cv::debug_build_guard::_OutputArray const &)" (?estimatePoseSingleMarkers@aruco@cv@@YAXAEBV_InputArray@debug_build_guard@2@M00AEBV_OutputArray@42@11@Z) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::aruco::drawDetectedMarkers(class cv::debug_build_guard::_InputOutputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::Scalar_<double>)" (?drawDetectedMarkers@aruco@cv@@YAXAEBV_InputOutputArray@debug_build_guard@2@AEBV_InputArray@42@1V?$Scalar_@N@2@@Z) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK2019 unresolved external symbol "void __cdecl cv::aruco::drawAxis(class cv::debug_build_guard::_InputOutputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,class cv::debug_build_guard::_InputArray const &,float)" (?drawAxis@aruco@cv@@YAXAEBV_InputOutputArray@debug_build_guard@2@AEBV_InputArray@42@111M@Z) referenced in function main Project2 E:\project\Project2\Project2\Source.obj 1
Error LNK1120 6 unresolved externals Project2 E:\project\Project2\x64\Debug\Project2.exe 1