Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. error: LNK2019: unresolved external symbol
Qt 6.11 is out! See what's new in the release blog

error: LNK2019: unresolved external symbol

Scheduled Pinned Locked Moved General and Desktop
9 Posts 4 Posters 6.3k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    Faisal_Ali
    wrote on last edited by
    #1

    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)

    kshegunovK 1 Reply Last reply
    0
    • F Faisal_Ali

      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)

      kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      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.

      Read and abide by the Qt Code of Conduct

      1 Reply Last reply
      1
      • F Offline
        F Offline
        Faisal_Ali
        wrote on last edited by
        #3

        yes i install window sdk and linked opencv libraries file

        kshegunovK 1 Reply Last reply
        0
        • F Faisal_Ali

          yes i install window sdk and linked opencv libraries file

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          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.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          1
          • F Offline
            F Offline
            Faisal_Ali
            wrote on last edited by
            #5

            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"

            jsulmJ 1 Reply Last reply
            0
            • F Faisal_Ali

              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"

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

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

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • F Offline
                F Offline
                Faisal_Ali
                wrote on last edited by
                #7

                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"

                kshegunovK 1 Reply Last reply
                0
                • F Faisal_Ali

                  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"

                  kshegunovK Offline
                  kshegunovK Offline
                  kshegunov
                  Moderators
                  wrote on last edited by
                  #8

                  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.

                  Read and abide by the Qt Code of Conduct

                  1 Reply Last reply
                  0
                  • ? Offline
                    ? Offline
                    A Former User
                    wrote on last edited by
                    #9

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

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved