4

I know this question is all over the place, but still the magic stick of adding the library directories to the project properties is not working for me.

I followed the tutorial for Visual Studio (2013 I have here) and the environment variable setup for opencv 3.0 beta.

And it's the same code on the Test it! section. Here's the header of build output in vs:

1>------ Build started: Project: OpenCVTest, Configuration: Debug Win32 ------
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsFlip_16u_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getFlipFunc(int))(void *,int)" (?getFlipFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH@Z)
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsFlip_32f_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getFlipFunc(int))(void *,int)" (?getFlipFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH@Z)
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsFlip_64f_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getFlipFunc(int))(void *,int)" (?getFlipFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH@Z)
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsFlip_8u_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getFlipFunc(int))(void *,int)" (?getFlipFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH@Z)
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsSortAscend_8u_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getSortFunc(int,bool))(void *,int)" (?getSortFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH_N@Z)
1>opencv_core300d.lib(matrix.obj) : error LNK2019: unresolved external symbol _ippicvsSortDescend_8u_I@8 referenced in function "enum IppStatus (__stdcall*__cdecl cv::getSortFunc(int,bool))(void *,int)" (?getSortFunc@cv@@YAP6G?AW4IppStatus@@PAXH@ZH_N@Z)

The rest of the log is the same. I've used the opencv\build\x86\vs12 directory contents for the lib and bin directories. I'm blindly using the /MDd option in C/C++->Code Generation->Runtime Library option. What's wrong?

Community
  • 1
  • 1
MadeOfAir
  • 2,933
  • 5
  • 31
  • 39
  • 2
    These symbols come from the new 3rd party library ippicv that contains a subset of useful Intel IPP functions. Try to locate ippicvmt.lib and make sure to add that to the link list and it's path to the addition library directories. I'm not sure about `/MD` vs `/MT`. You may have to switch. Actually, I'm surprised the ippicv library isn't statically linked into opencv already. – chappjc Dec 16 '14 at 01:12
  • Thanks @chappjc . I've used your guidance and others to get it working. I'll answer it below. – MadeOfAir Dec 16 '14 at 09:33

2 Answers2

11

I added $(OPENCV_DIR)\staticlib to Library Directories and also to Linker->Additional Library Directores and added the following to Linker->Input->Additional Dependencies:

ippicvmt.lib
IlmImfd.lib
libtiffd.lib
libpngd.lib
libjasperd.lib
libjpegd.lib
libwebpd.lib
zlibd.lib
comctl32.lib

And the example now works.

MadeOfAir
  • 2,933
  • 5
  • 31
  • 39
3

Unfortunately that solution did not work for me. For those in a similar situation:

It can work by adding as additional dependencies(Linker -> Input -> Additional Dependencies:) only those libraries located in my $(OPENCV_DIR)\lib folder. Namely: opencv_ts300d.lib;opencv_world300d.lib.