LNK2019 - visual studio 2013 - 尽管定义了所有符号,但仍然出错
问题描述:
我在Visual Studio 2013中有一个Win32控制台应用程序项目。我已经设置了项目以使用OpenCV 2.4.9。我也使用PGRFlyCapture SDK(http://ww2.ptgrey.com/sdk/flycap),所以我为这个sdk配置了include,bin,lib的路径。LNK2019 - visual studio 2013 - 尽管定义了所有符号,但仍然出错
有一个我创建的头文件,以及一个.cpp文件来定义头文件中声明的所有函数原型。尽管如此,我得到了LNK2019未解决的外部符号错误。
- 我需要帮助摆脱这些LNK2019错误。
- 想要一个到PGRFlyCapture SDK的链接,因为我没有找到它,也许我错误地用Visual Studio中的项目配置了SDK。
发布错误列表以供参考。
Error 21 error LNK1120: 20 unresolved externals C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\Debug\VideoGrabber_V3.exe VideoGrabber_V3
Error 1 error LNK2001: unresolved external symbol "const FlyCapture2::CameraBase::`vftable'" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\FlyCapture2GUId_v120.exp VideoGrabber_V3
Error 13 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 9 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::close(void)" ([email protected]@@QAE_NXZ) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 12 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 8 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 11 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 10 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::close(void)" ([email protected]@@QAE_NXZ) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 20 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 15 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 18 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::readNextFrame(unsigned char *,bool)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 16 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 14 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::close(void)" ([email protected]@@QAE_NXZ) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 17 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 19 error LNK2019: unresolved external symbol [email protected] referenced in function "public: bool __thiscall PGRAviFile::appendBMP(char const *)" ([email protected]@@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 6 error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" ([email protected]@@QAEHHH[email protected]@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 4 error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" ([email protected]@@[email protected]@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 3 error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" ([email protected]@@[email protected]@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 5 error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" ([email protected]@@[email protected]@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 7 error LNK2019: unresolved external symbol [email protected] referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" ([email protected]@@[email protected]@[email protected]) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
Error 2 error LNK2019: unresolved external symbol [email protected] referenced in function "private: bool __thiscall PGRAviFile::checkVFWVersion(void)" ([email protected]@@AAE_NXZ) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj VideoGrabber_V3
答
我做了一个小挖四周,发现WindowsSDK是不是我的系统上安装。安装它并将Vfw32.lib链接到我的项目。所有的LNK2019错误都得到了解决。
与'Vfw32.lib'链接 - 应该照顾其中的大部分。不能用'FlyCapture2 :: CameraBase'一个。 – 2014-09-24 01:43:17
我能获得更多帮助吗? Vfw32.lib在哪里找到的? – 2014-09-24 15:58:40
它附带了Windows SDK,它应该是Visual Studio安装的一部分。只需在Project> Properties> Linker> Input> Additional Dependencies下面提到它。 – 2014-09-24 16:46:43