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. Compilation Error , Can't find lib file.
Forum Updated to NodeBB v4.3 + New Features

Compilation Error , Can't find lib file.

Scheduled Pinned Locked Moved General and Desktop
11 Posts 3 Posters 17.2k 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.
  • H Offline
    H Offline
    HuXiKa
    wrote on last edited by
    #2

    You have to add another line to your .pro file:

    @
    LIBS += -Lpath_of_the_directory_which_contains_your_lib
    @

    Or, if you don't want to use static linking, check out "QLibrary":http://doc.trolltech.com/latest/qlibrary.html.

    If you can find faults of spelling in the text above, you can keep them.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #3

      Hi Vijay,
      the statement should adds a library "z" for the linking process. This statement is valid for unix. Which compiler are using?

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #4

        An addition to the post.
        You should have a look to the "qmake libs parameter":http://doc.qt.nokia.com/latest/qmake-variable-reference.html#libs
        It expalins in "length" the parameter.
        HuXiKa is right that you might need to add the path to the library to the LIBS statement. However, this might depend on the compiler you are using.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • V Offline
          V Offline
          vijaydandur
          wrote on last edited by
          #5

          Hi All,
          I found that the code related to "z" library is found in qt installation directory.

          i.e "C:\Qt\2010.05\qt\src\3rdparty\zlib"

          Now could you please tell me how do I need to modify "LIBS += -lz" line in pro, to use the library from the above specified path..
          I tried lot of options but nothing is working out.

          and regarding the compiler, I’m using qt 4.7.0 on win7 64bit os. then this must be using Mingw

          Also to give you some more information, the pro file has following statements .

          @
          LIBS += -lz
          win32 {
          INCLUDEPATH += c:\development\zlib-1.2.3
          LIBS += -Lc:\development\zlib-1.2.3
          }
          @

          Kindly help on this.

          Regards,
          Vijay.

          1 Reply Last reply
          0
          • K Offline
            K Offline
            koahnig
            wrote on last edited by
            #6

            Hi Vijay,

            I am not sure what sequence you might require in the pro file. However, typically you see the path infront of the lib.

            @
            win32 {
            INCLUDEPATH += c:/development/zlib-1.2.3
            LIBS += -Lc:/development/zlib-1.2.3
            }
            LIBS += -lz
            @

            I have changed your backward slash into the forward version. Windows can handle both, but the forward version is a little easier to handle.
            The actual path of the library has to be included. I am not sure why you have chosen a different path from "C:/Qt/2010.05/qt/src/3rdparty/zlib" in your example.

            The statement INCLUDEPATH is required for finding the includes.

            The origin of your problem is that you are trying to use a library where you do not have the library yet. All the path' are showing to a src directory. I have checked my installation (4.7.0 on win7 64 bit). I cannot find zlib readily compiled for linking. You need to do so. Check the readme file and others in the directory. This should provide you with the necessary details.

            Finally a recommendation to use the newest version of Qt. Download the most recent version 4.7.3.
            the name should look like this: http://get.qt.nokia.com/qt/source/qt-win-opensource-4.7.3-mingw.exe or similar depending on what options you are choosing.

            Vote the answer(s) that helped you to solve your issue(s)

            1 Reply Last reply
            0
            • V Offline
              V Offline
              vijaydandur
              wrote on last edited by
              #7

              Hi koahnig and HuXiKa,
              Thanks a lot for your suggestions, I tried those, but not arriving at the solution.
              Ok, what I'm really working on is this "https://sourceforge.net/projects/umplayer/develop" a qt based media player with many unique features.

              As i said earlier I’m using qt 4.7.0 on win7 64bit os.

              Can you please, if possible get this project and compile it on windows OS, so that you would get what exactly the problems that I'm facing in getting this project compiled.

              I hope for a positive reply.

              Regards,
              Vijay.

              1 Reply Last reply
              0
              • K Offline
                K Offline
                koahnig
                wrote on last edited by
                #8

                Hi Vijay,

                for curiosity I had a look to your link supplied. It does not lead anywhere.
                It returns with:
                @This page has been deprecated and is now controlled by the consume team.@

                Did you try to compile the 3rd party zlib?
                Since it is not part of Qt everybody will run into the problem as you did. The lib is simply not available.
                Try to compile it. However, you are on your own there. I cannot give support, since I have not done a compilation of Qt's 3rd party SW before.
                So again, did you try to compile the 3rd party lib?

                Vote the answer(s) that helped you to solve your issue(s)

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  vijaydandur
                  wrote on last edited by
                  #9

                  Hi Koahnig,
                  Sorry the link mentioned above is redirecting to wrong location, you can use the below link.

                  http://sourceforge.net/projects/umplayer/
                  Click on " Code -> SVN " it will take you to a new page where you can see the location from where you can get the code.

                  As you have mentioned the lib files are not readily available for 3rd party components, we need to build it manually, I checked that option also, the project needs to be compiled with visual studio. I'm trying out this now.

                  Meanwhile if you come across any solutions, please guide me.

                  Regards,
                  Vijay.

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    koahnig
                    wrote on last edited by
                    #10

                    Hi Vijay

                    I hope you are using the same compiler throughout your project. Mixing different compilers will certainly NOT help.

                    Best regards, Koahnig

                    Vote the answer(s) that helped you to solve your issue(s)

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      koahnig
                      wrote on last edited by
                      #11

                      Hi Vijay

                      I just saw that you can add zlib support while compiling a version of Qt for your platform.
                      You need to use the parameter "-qt-zlib" in the configure command. That might be the saver option for you to compile zlib.

                      Vote the answer(s) that helped you to solve your issue(s)

                      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