error: LNK2019: unresolved external symbol



  • Hi
    i got this error while i run OPENCV code "(display image using OPENCV)" in qtcreator.

    opencv_highgui310d.lib(window_w32.obj):-1: error: LNK2019: unresolved external symbol __imp_BitBlt referenced in function "__int64 cdecl HighGUIProc(struct HWND *,unsigned int,unsigned __int64,int64)" (?HighGUIProc@@YA_JPEAUHWND@@I_K_J@Z)


  • Qt Champions 2016

    Hello,
    Have you installed the windows SDK and linked the appropriate system libraries? If not, then do so.

    PS.
    This isn't a Qt question by the way.

    Edit:
    Please, don't post the same question in multiple subforums.



  • yes i install window sdk and linked opencv libraries file


  • Qt Champions 2016

    Please provide the linker invocation (the link line) from the QtCreator compile output tab.
    BitBlt is a WinAPI function and I suspect you're linking statically without actually linking the windows system libraries.



  • Here is compile output :
    jom: D:\qt project\build-untitled1-Desktop_Qt_5_7_0_MSVC2013_64bit-Debug\Makefile.Debug [debug\untitled1.exe] Error 1120
    jom: D:\qt project\build-untitled1-Desktop_Qt_5_7_0_MSVC2013_64bit-Debug\Makefile [debug] Error 2
    15:08:52: The process "D:\qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project untitled1 (kit: Desktop Qt 5.7.0 MSVC2013 64bit)
    When executing step "Make"


  • Moderators

    @Faisal_Ali This is not the complete output. And @kshegunov wanted to see how the linker was called. Just post the complete output.



  • opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsExp_64f_A50 referenced in function "void __cdecl cv::Exp_64f_ipp(double const *,double *,int)" (?Exp_64f_ipp@cv@@YAXPEBNPEANH@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsLn_32f_A21 referenced in function "void __cdecl cv::Log_32f_ipp(float const *,float *,int)" (?Log_32f_ipp@cv@@YAXPEBMPEAMH@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsLn_64f_A50 referenced in function "void __cdecl cv::Log_64f_ipp(double const *,double *,int)" (?Log_64f_ipp@cv@@YAXPEBNPEANH@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsPowx_32f_A21 referenced in function "void __cdecl cv::pow(class cv::_InputArray const &,double,class cv::_OutputArray const &)" (?pow@cv@@YAXAEBV_InputArray@1@NAEBV_OutputArray@1@@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsPowx_64f_A50 referenced in function "void __cdecl cv::pow(class cv::_InputArray const &,double,class cv::_OutputArray const &)" (?pow@cv@@YAXAEBV_InputArray@1@NAEBV_OutputArray@1@@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsPolarToCart_32f referenced in function "void __cdecl cv::polarToCart(class cv::_InputArray const &,class cv::_InputArray const &,class cv::_OutputArray const &,class cv::_OutputArray const &,bool)" (?polarToCart@cv@@YAXAEBV_InputArray@1@0AEBV_OutputArray@1@1_N@Z)
    opencv_core310d.lib(mathfuncs.obj) : error LNK2019: unresolved external symbol ippicvsPolarToCart_64f referenced in function "void __cdecl cv::polarToCart(class cv::_InputArray const &,class cv::_InputArray const &,class cv::_OutputArray const &,class cv::_OutputArray const &,bool)" (?polarToCart@cv@@YAXAEBV_InputArray@1@0AEBV_OutputArray@1@1_N@Z)
    debug\untitled1.exe : fatal error LNK1120: 620 unresolved externals
    jom: D:\qt project\build-untitled1-Desktop_Qt_5_7_0_MSVC2013_64bit-Debug\Makefile.Debug [debug\untitled1.exe] Error 1120
    jom: D:\qt project\build-untitled1-Desktop_Qt_5_7_0_MSVC2013_64bit-Debug\Makefile [debug] Error 2
    18:58:16: The process "D:\qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
    Error while building/deploying project untitled1 (kit: Desktop Qt 5.7.0 MSVC2013 64bit)
    When executing step "Make"


  • Qt Champions 2016

    This still isn't the complete output! The link line is still missing. From what I can tell by the errors you have a dependency (a library) you haven't met, but what it is I don't know. You must link all OpenCV dependencies to the application to be able to link statically.


  • Moderators

    Please use the forum search, there are already quite a number of threads about OpenCV, eg. https://forum.qt.io/topic/73289.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.