2

I have a Win32 Console Application project in Visual Studio 2013. I've set up the project to work with OpenCV 2.4.9. I'm also using PGRFlyCapture SDK (http://ww2.ptgrey.com/sdk/flycap), so I have configured the paths for include,bin,lib for this sdk.

There's a header file that I've created, along with a .cpp file to define all the function prototypes declared in the header file. Despite that, I'm getting the LNK2019 unresolved external symbol error.

  1. I need help getting rid of these LNK2019 errors.
  2. Would like a link to the PGRFlyCapture SDK as I didn't find it, maybe I've configured the SDK with the project in Visual Studio incorrectly.

Posting the error list for reference.

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'" (??_7CameraBase@FlyCapture2@@6B@)  C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\FlyCapture2GUId_v120.exp  VideoGrabber_V3
Error   13  error LNK2019: unresolved external symbol _AVIFileCreateStreamW@12 referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" (?open@PGRAviFile@@QAE_NPBDHHHN@Z)    C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   9   error LNK2019: unresolved external symbol _AVIFileExit@0 referenced in function "public: bool __thiscall PGRAviFile::close(void)" (?close@PGRAviFile@@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 _AVIFileGetStream@16 referenced in function "public: bool __thiscall PGRAviFile::open(char *)" (?open@PGRAviFile@@QAE_NPAD@Z) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   8   error LNK2019: unresolved external symbol _AVIFileInit@0 referenced in function "public: bool __thiscall PGRAviFile::open(char *)" (?open@PGRAviFile@@QAE_NPAD@Z)   C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   11  error LNK2019: unresolved external symbol _AVIFileOpenW@16 referenced in function "public: bool __thiscall PGRAviFile::open(char *)" (?open@PGRAviFile@@QAE_NPAD@Z) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   10  error LNK2019: unresolved external symbol _AVIFileRelease@4 referenced in function "public: bool __thiscall PGRAviFile::close(void)" (?close@PGRAviFile@@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 _AVIMakeCompressedStream@16 referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" (?open@PGRAviFile@@QAE_NPBDHHHN@Z) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   15  error LNK2019: unresolved external symbol _AVIStreamInfoW@12 referenced in function "public: bool __thiscall PGRAviFile::open(char *)" (?open@PGRAviFile@@QAE_NPAD@Z)   C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   18  error LNK2019: unresolved external symbol _AVIStreamRead@28 referenced in function "public: bool __thiscall PGRAviFile::readNextFrame(unsigned char *,bool)" (?readNextFrame@PGRAviFile@@QAE_NPAE_N@Z)  C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   16  error LNK2019: unresolved external symbol _AVIStreamReadFormat@16 referenced in function "public: bool __thiscall PGRAviFile::open(char *)" (?open@PGRAviFile@@QAE_NPAD@Z)  C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   14  error LNK2019: unresolved external symbol _AVIStreamRelease@4 referenced in function "public: bool __thiscall PGRAviFile::close(void)" (?close@PGRAviFile@@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 _AVIStreamSetFormat@16 referenced in function "public: bool __thiscall PGRAviFile::open(char const *,int,int,int,double)" (?open@PGRAviFile@@QAE_NPBDHHHN@Z)  C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   19  error LNK2019: unresolved external symbol _AVIStreamWrite@32 referenced in function "public: bool __thiscall PGRAviFile::appendBMP(char const *)" (?appendBMP@PGRAviFile@@QAE_NPBD@Z)   C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   6   error LNK2019: unresolved external symbol _ICClose@4 referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" (?enumerateCompressors@PGRAviFile@@QAEHHHHPAUICINFO@@H@Z)    C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   4   error LNK2019: unresolved external symbol _ICGetInfo@12 referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" (?enumerateCompressors@PGRAviFile@@QAEHHHHPAUICINFO@@H@Z) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   3   error LNK2019: unresolved external symbol _ICInfo@12 referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" (?enumerateCompressors@PGRAviFile@@QAEHHHHPAUICINFO@@H@Z)    C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   5   error LNK2019: unresolved external symbol _ICOpen@12 referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" (?enumerateCompressors@PGRAviFile@@QAEHHHHPAUICINFO@@H@Z)    C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   7   error LNK2019: unresolved external symbol _ICSendMessage@16 referenced in function "public: int __thiscall PGRAviFile::enumerateCompressors(int,int,int,struct ICINFO *,int)" (?enumerateCompressors@PGRAviFile@@QAEHHHHPAUICINFO@@H@Z) C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Error   2   error LNK2019: unresolved external symbol _VideoForWindowsVersion@0 referenced in function "private: bool __thiscall PGRAviFile::checkVFWVersion(void)" (?checkVFWVersion@PGRAviFile@@AAE_NXZ)  C:\Users\jtower\Documents\Visual Studio 2013\Projects\VideoGrabber_V3\VideoGrabber_V3\PGRAviFile.obj    VideoGrabber_V3
Chai Nadig
  • 417
  • 1
  • 6
  • 23
  • 2
    Link with `Vfw32.lib` - that should take care of most of these. Can't help with `FlyCapture2::CameraBase` one. – Igor Tandetnik Sep 24 '14 at 01:43
  • Can I get more help on this? where is the Vfw32.lib found? – Chai Nadig Sep 24 '14 at 15:58
  • It comes with Windows SDK, which should be part of Visual Studio installation. Just mention it under Project > Properties > Linker > Input > Additional Dependencies. – Igor Tandetnik Sep 24 '14 at 16:46
  • Thanks! I did a little digging around and found that WindowsSDK was not installed on my system. Installed it and linked Vfw32.lib to my project. All errors except the `FlyCapture2::CameraBase` have been resolved. – Chai Nadig Sep 24 '14 at 16:57
  • @IgorTandetnik, I would accept your solution as answer if you post it as an answer. – Chai Nadig Oct 09 '14 at 18:00
  • How are you able to use PGRFlyCapture SDK with VS2013? When I downloaded the SDK (version 2.7.3.18, x86 and x64), there were only binaries for VS2012 and below. – may5694 Apr 14 '15 at 00:52

1 Answers1

3

I did a little digging around and found that WindowsSDK was not installed on my system. Installed it and linked Vfw32.lib to my project. All LNK2019 errors got resolved.

Chai Nadig
  • 417
  • 1
  • 6
  • 23