1>C:\opencv243\build\include\constants.h(15): warning C4305: 'initializing' : truncation from 'double' to 'const float'
1>C:\opencv243\build\include\constants.h(26): warning C4305: 'initializing' : truncation from 'double' to 'const float'
1>prog.cpp(16): warning C4068: unknown pragma
1>prog.cpp(44): warning C4068: unknown pragma
1>prog.cpp(48): error C3861: 'round': identifier not found
1>prog.cpp(49): error C3861: 'round': identifier not found
1>prog.cpp(54): warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data
1>prog.cpp(74): warning C4068: unknown pragma
1>prog.cpp(189): warning C4068: unknown pragma
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
我想运行准确的眼睛中心跟踪程序,但这些是我的错误......请帮我解决这个问题..我没有足够的时间来完成这个项目..
(如果我的所有代码都是必要的,我可以发送)
*的 修改 * 我项目的最后状态;它有构建错误..:
1>------ Build started: Project: MNOpenCV, Configuration: Debug Win32 ------
1>hkjn.obj : error LNK2019: unresolved external symbol "double __cdecl computeDynamicThreshold(class cv::Mat const &,double)" (?computeDynamicThreshold@@YANABVMat@cv@@N@Z) referenced in function "class cv::Point_<int> __cdecl findEyeCenter(class cv::Mat,class cv::Rect_<int>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?findEyeCenter@@YA?AV?$Point_@H@cv@@VMat@2@V?$Rect_@H@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>hkjn.obj : error LNK2019: unresolved external symbol "class cv::Mat __cdecl matrixMagnitude(class cv::Mat const &,class cv::Mat const &)" (?matrixMagnitude@@YA?AVMat@cv@@ABV12@0@Z) referenced in function "class cv::Point_<int> __cdecl findEyeCenter(class cv::Mat,class cv::Rect_<int>,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?findEyeCenter@@YA?AV?$Point_@H@cv@@VMat@2@V?$Rect_@H@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>hkjn.obj : error LNK2019: unresolved external symbol "bool __cdecl inMat(class cv::Point_<int>,int,int)" (?inMat@@YA_NV?$Point_@H@cv@@HH@Z) referenced in function "bool __cdecl floodShouldPushPoint(class cv::Point_<int> const &,class cv::Mat const &)" (?floodShouldPushPoint@@YA_NABV?$Point_@H@cv@@ABVMat@2@@Z)
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
1>C:\Users\AA\Documents\Visual Studio 2010\Projects\MNOpenCV\Debug\MNOpenCV.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
答案 0 :(得分:0)
也许您忘了添加“双轮(双x)”功能的包含?
#include <math.h>
如果没有,那可能是你的pragma说明问题......
祝你好运!