opencv : unresolved external symbol

10,743

Solution 1

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.

Solution 2

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.

Share:
10,743
MadeOfAir
Author by

MadeOfAir

* * | + + | (~)

Updated on June 20, 2022

Comments

  • MadeOfAir
    MadeOfAir almost 2 years

    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?