Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    error: LNK2019: unresolved external symbol

    General and Desktop
    4
    9
    3616
    Loading More Posts
    • 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
      Faisal_Ali last edited by

      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)

      kshegunov 1 Reply Last reply Reply Quote 0
      • kshegunov
        kshegunov Moderators @Faisal_Ali last edited by kshegunov

        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 Reply Quote 1
        • F
          Faisal_Ali last edited by

          yes i install window sdk and linked opencv libraries file

          kshegunov 1 Reply Last reply Reply Quote 0
          • kshegunov
            kshegunov Moderators @Faisal_Ali last edited by

            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 Reply Quote 1
            • F
              Faisal_Ali last edited by

              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"

              jsulm 1 Reply Last reply Reply Quote 0
              • jsulm
                jsulm Lifetime Qt Champion @Faisal_Ali last edited by

                @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 Reply Quote 1
                • F
                  Faisal_Ali last edited by

                  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"

                  kshegunov 1 Reply Last reply Reply Quote 0
                  • kshegunov
                    kshegunov Moderators @Faisal_Ali last edited by

                    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 Reply Quote 0
                    • ?
                      A Former User last edited by

                      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 Reply Quote 0
                      • First post
                        Last post