error LNK2019: 无法解析的外部符号 "void __cdecl cv::calcHist
来源:互联网 发布:大数据精准营销特点 编辑:程序博客网 时间:2024/06/05 16:35
今天用calcHist()写一个直方图的基本程序 结果报错LNK2019
在网上搜索一直是说库的链接不正确 但是我已经加入所有opencv的库了
最后的最后 发现是解决方案平台应该改成x64而不是Win32 (因为我是64位系统但是VS默认是win32)但是作为小白始终不明白为什么这样就会出现链接库的错误 求大神解释
报错如下:
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::calcHist(class cv::Mat const *,int,int const *,class cv::_InputArray const &,class cv::_OutputArray const &,int,int const *,float const * *,bool,bool)" (?calcHist@cv@@YAXPBVMat@1@HPBHABV_InputArray@1@ABV_OutputArray@1@H1PAPBM_N5@Z),该符号在函数 "public: class cv::Mat __thiscall Histogram1D::getHistogram(class cv::Mat const &)" (?getHistogram@Histogram1D@@QAE?AVMat@cv@@ABV23@@Z) 中被引用
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall cv::_InputArray::_InputArray(class cv::Mat const &)" (??0_InputArray@cv@@QAE@ABVMat@1@@Z),该符号在函数 "public: class cv::Mat __thiscall Histogram1D::getHistogram(class cv::Mat const &)" (?getHistogram@Histogram1D@@QAE?AVMat@cv@@ABV23@@Z) 中被引用1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall cv::_OutputArray::_OutputArray(class cv::Mat &)" (??0_OutputArray@cv@@QAE@AAVMat@1@@Z),该符号在函数 "public: class cv::Mat __thiscall Histogram1D::getHistogram(class cv::Mat const &)" (?getHistogram@Histogram1D@@QAE?AVMat@cv@@ABV23@@Z) 中被引用
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall cv::Mat::copySize(class cv::Mat const &)" (?copySize@Mat@cv@@QAEXABV12@@Z),该符号在函数 "public: __thiscall cv::Mat::Mat(class cv::Mat const &)" (??0Mat@cv@@QAE@ABV01@@Z) 中被引用
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "int __cdecl cv::_interlockedExchangeAdd(int *,int)" (?_interlockedExchangeAdd@cv@@YAHPAHH@Z),该符号在函数 "public: __thiscall cv::Mat::Mat(class cv::Mat const &)" (??0Mat@cv@@QAE@ABV01@@Z) 中被引用
1>main.obj : error LNK2001: 无法解析的外部符号 "int __cdecl cv::_interlockedExchangeAdd(int *,int)" (?_interlockedExchangeAdd@cv@@YAHPAHH@Z)
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z),该符号在函数 "public: __thiscall cv::Mat::~Mat(void)" (??1Mat@cv@@QAE@XZ) 中被引用
1>main.obj : error LNK2001: 无法解析的外部符号 "void __cdecl cv::fastFree(void *)" (?fastFree@cv@@YAXPAX@Z)
1>Histogram1D.obj : error LNK2019: 无法解析的外部符号 "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ),该符号在函数 "public: void __thiscall cv::Mat::release(void)" (?release@Mat@cv@@QAEXXZ) 中被引用
1>main.obj : error LNK2001: 无法解析的外部符号 "public: void __thiscall cv::Mat::deallocate(void)" (?deallocate@Mat@cv@@QAEXXZ)
1>main.obj : error LNK2019: 无法解析的外部符号 "class cv::Mat __cdecl cv::imread(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?imread@cv@@YA?AVMat@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z),该符号在函数 _main 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: virtual __thiscall cv::Exception::~Exception(void)" (??1Exception@cv@@UAE@XZ),该符号在函数 "public: float & __thiscall cv::Mat::at<float>(int)" (??$at@M@Mat@cv@@QAEAAMH@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "void __cdecl cv::error(class cv::Exception const &)" (?error@cv@@YAXABVException@1@@Z),该符号在函数 "public: float & __thiscall cv::Mat::at<float>(int)" (??$at@M@Mat@cv@@QAEAAMH@Z) 中被引用
1>main.obj : error LNK2019: 无法解析的外部符号 "public: __thiscall cv::Exception::Exception(int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (??0Exception@cv@@QAE@HABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@00H@Z),该符号在函数 "public: float & __thiscall cv::Mat::at<float>(int)" (??$at@M@Mat@cv@@QAEAAMH@Z) 中被引用
1>D:\STUDY\Coding\C++\OpenCV\practice\Chapter4\Debug\Chapter4.exe : fatal error LNK1120: 11 个无法解析的外部命令
1>
0 0
- error LNK2019: 无法解析的外部符号 "void __cdecl cv::calcHist
- error LNK2019:无法解析的外部符号 __cdecl std::_String_base::_Xran(void) 和_Xlen(void)
- 错误 error LNK2019: 无法解析的外部符号 "void __cdecl ........的解决
- error LNK2019: 无法解析的外部符号CCScrollView * __cdecl cocos2d::extension::CCScrollView::create(void)
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: static void __cdecl xercesc_2_8::XMLPlatfor
- error LNK2019: 无法解析的外部符号 "int __cdecl wsprintfWInternal
- error LNK2019: 无法解析的外部符号 _cvHaarDetectObjects,该符号在函数 "void __cdecl detect_and_draw(struct _IplImage
- error LNK2019: 无法解析的外部符号 _cvHaarDetectObjects,该符号在函数 "void __cdecl detect_and_draw(struct _IplImage
- error LNK2019: 无法解析的外部符号 _gzputs,该符号在函数 "void __cdecl icvPuts(struct CvFileStorage *,char const
- error LNK2019: 无法解析的外部符号 _gzputs,该符号在函数 "void __cdecl icvPuts(struct CvFileStorage *,char const
- error LNK2019: 无法解析的外部符号 WinMain,该符号在函数 "int __cdecl invoke_main(void)”中被引用
- MSVCRTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 "int __cdecl invoke_main(void)"
- error LNK2019: 无法解析的外部符号 "void __cdecl QTest::qSleep(int)",该符号在函数 "void __cdecl QTest::qWait(int)"中被
- error LNK2019: 无法解析的外部符号 "public: void __thiscall
- VC编译错误:error LNK2019: 无法解析的外部符号 "void __stdcall _com_issue_error(long)" (?_com_issue_error@@YGXJ@Z),该符号在函数 "void __cdecl _com_ut
- OpenCV编程->无法解析的外部符号 "void __cdecl cv::cvtColor
- 1>MSVCRTD.lib(exe_main.obj) : error LNK2019: 无法解析的外部符号 _main,该符号在函数 "int __cdecl invoke_main(void)"
- error: LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: __cdecl QWidget::
- ubuntu下php开发环境的搭建
- Discrete AdaBoost,Real AdaBoost,LogitBoost AdaBoost,Gentle AdaBoost
- LeetCode 之 Populating Next Right Pointers in Each Node I II — C++ 实现
- mysql 从的一些参数设置
- 10款超炫的开源jquery的源码预览效果
- error LNK2019: 无法解析的外部符号 "void __cdecl cv::calcHist
- SPI协议简介
- foundation-NSDictonary&NSMutableDictionary
- Clone Graph DFS&BFS 图的复制
- 出走一厦门篇
- 智能听音公司Soundhawk获得550万美元融资,通过降噪算法让用户听到真正想听的声音
- 35.app后端搜索入门
- javax.swing.Timer 使用
- 黑马程序员——Java基础---线程的另一个总结(7)--condition,await