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. SOLVED anybody writing with Qt 5.3 using OpenCV3 on Windows 7 64 bit machine
Forum Updated to NodeBB v4.3 + New Features

SOLVED anybody writing with Qt 5.3 using OpenCV3 on Windows 7 64 bit machine

Scheduled Pinned Locked Moved General and Desktop
21 Posts 3 Posters 9.1k Views 1 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #8

    lib files are tricky on windows, they can either be import libraries or static libraries, generally their size is a good indicator of which type they are.

    Microsoft also proposes two possible runtimes: static and dynamic. Now the fun part: you can build a static lib/app that links to the dynamic runtime or a dynamic library/application against the static runtime.

    The thing is, you have to select one or the other runtime and link all your components to the same version. The recommended runtime is the dynamic.

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • B Offline
      B Offline
      BOHICAMAN
      wrote on last edited by
      #9

      Once again, I TRULY APPRECIATE YOUR HELP AND ADVISE!!

      However, I'm at my wits end trying to simply get OpenCV to work with a short Qt Wiget project. I spent the last week reading the documentation here, QT and OpenCV books, watching Youtube videos...all without luck. I loaded both PRE-COMPILED programs and can not get then to work together. I tried the source programs and had even more problems.

      This seems to be a whole lot more trouble than it's worth! However, as I've never been a quiter, I'll give it one more week.

      Thanks again!

      1 Reply Last reply
      0
      • B Offline
        B Offline
        BOHICAMAN
        wrote on last edited by
        #10

        Ok, I have gone from 4500+ errors down to 135. Here are the first five. They all are similar. Can't figure these out! Any guidance??

        Error 1 error LNK2019: unresolved external symbol gzputs referenced in function "void __cdecl icvPuts(struct CvFileStorage *,char const *)" (?icvPuts@@YAXPEAUCvFileStorage@@PEBD@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
        Error 2 error LNK2019: unresolved external symbol gzgets referenced in function "char * __cdecl icvGets(struct CvFileStorage *,char *,int)" (?icvGets@@YAPEADPEAUCvFileStorage@@PEADH@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
        Error 3 error LNK2019: unresolved external symbol gzrewind referenced in function "void __cdecl icvRewind(struct CvFileStorage *)" (?icvRewind@@YAXPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
        Error 4 error LNK2019: unresolved external symbol gzeof referenced in function "int __cdecl icvEof(struct CvFileStorage *)" (?icvEof@@YAHPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV
        Error 5 error LNK2019: unresolved external symbol gzclose referenced in function "void __cdecl icvCloseFile(struct CvFileStorage *)" (?icvCloseFile@@YAXPEAUCvFileStorage@@@Z) D:\AllProgrammingProjs\C++Stuff\MyNewOpenCV\MyNewOpenCV\opencv_core249d.lib(persistence.obj) MyNewOpenCV

        1 Reply Last reply
        0
        • B Offline
          B Offline
          BOHICAMAN
          wrote on last edited by
          #11

          This was an error. double tapped the enter key. sorry!

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #12

            What do you mean by that ?

            The missing symbols comes from zlib

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • B Offline
              B Offline
              BOHICAMAN
              wrote on last edited by
              #13

              I am TOTALLY lost. Please explain!

              1 Reply Last reply
              0
              • B Offline
                B Offline
                BOHICAMAN
                wrote on last edited by
                #14

                "What do you mean by that?" I assume you mean my comment about..."This was an error. double tapped the enter key. sorry!"... I pushed enter twice and it logged my comment twice. I deleted the comment and left that message./

                Please explain how you think I can fix the errors with your comment...

                "The missing symbols comes from zlib"

                I'm totally lost here!!

                Bob

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #15

                  Do you have a zlib.lib file in OpenCV somewhere ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    BOHICAMAN
                    wrote on last edited by
                    #16

                    Good evening!
                    Yes I have zlib.lib in the following OpenCV2.4.9 (which is the one I am now trying to use).

                    C:\OpenCV249\build\x86\vc12\staticlib
                    C:\OpenCV249\build\x86\vc11\staticlib
                    C:\OpenCV249\build\x86\vc10\staticlib
                    C:\OpenCV249\build\x64\vc12\staticlib
                    C:\OpenCV249\build\x64\vc11\staticlib
                    C:\OpenCV249\build\x64\vc10\staticlib

                    I have been trying to use the path for the x64\vc12 and have substituted the last folded with \staticlib, \lib & \bin, individually of course. None seemed to correct the errors.

                    1 Reply Last reply
                    0
                    • B Offline
                      B Offline
                      BOHICAMAN
                      wrote on last edited by
                      #17

                      Found a minor typo in the PROPERTY PAGE in Visual C++. That caused the coding to NOT find the proper PATH.

                      However, I will still keep studying the difference, and proper coding, for Static and Dynamic Libraries!!

                      Thanks again for the assistance and help!!

                      Bob

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #18

                        One important point if you want to go static with Qt, you'll need a commercial license.

                        The advantage of static linking is that you don't need to deploy dlls with your application but at the cost of the size of the application. You also don't have the choice when updating, you have to rebuild everything.

                        The dynamic linking allows you to switch libraries easily if you need e.g. a more recent version of one of your dependencies (the binary compatibility must still be checked, but that's another point)

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        1 Reply Last reply
                        0
                        • B Offline
                          B Offline
                          BOHICAMAN
                          wrote on last edited by
                          #19

                          Ah ha! That would probably be the answer to another question I posted...

                          Would that be the reason the "Deploy" options in the Build category are grayed out? They turn on with a commercial license purchase?

                          1 Reply Last reply
                          0
                          • SGaistS Offline
                            SGaistS Offline
                            SGaist
                            Lifetime Qt Champion
                            wrote on last edited by
                            #20

                            AFAIK no, licensing itself doesn't matter

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            0
                            • B Offline
                              B Offline
                              BOHICAMAN
                              wrote on last edited by
                              #21

                              Well, that's NOT good news! That means I have another problem!!

                              See:

                              http://qt-project.org/forums/viewthread/49622/

                              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