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. C1083: Cannot open include file: 'zlib.h': No such file or directory

C1083: Cannot open include file: 'zlib.h': No such file or directory

Scheduled Pinned Locked Moved Solved General and Desktop
9 Posts 4 Posters 10.8k Views
  • 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.
  • A Offline
    A Offline
    Anadeha
    wrote on 30 Sept 2020, 11:48 last edited by
    #1

    Hello, I have a problem: when I compile the program I was given, there is an error:
    5ae309a1-8f29-4989-9b57-253b6370e181-image.png

    10:20:45: The "C:\bin\Qt\Tools\QtCreator\bin\jom.exe" process ended with code 2.
    Error during compilation/deployment of the EconnectorMaster project (kit: Desktop)
    When executing step "Make"

    Is there anyone who could help me ?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      artwaw
      wrote on 30 Sept 2020, 11:53 last edited by
      #2

      Your program requires external library, ZLib. You need to have it compiled to run this program and you also need its header files to compile.

      For more information please re-read.

      Kind Regards,
      Artur

      1 Reply Last reply
      4
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 30 Sept 2020, 11:59 last edited by mrjj
        #3

        Hi
        As error says , visual studio cannot find the file zlib.h

        So you can either use mingw compiler instead as i think it has that file.
        or
        Read the documentationson GitHub or where the project lives and see
        what is suggested for the external dependencies.

        OR try to install zlib for windows and grab the file
        https://stackoverflow.com/questions/49634228/how-to-compile-zlib-into-a-dll-on-visual-studio-2017

        meh:: Too slow :)

        A A 2 Replies Last reply 30 Sept 2020, 12:02
        1
        • M mrjj
          30 Sept 2020, 11:59

          Hi
          As error says , visual studio cannot find the file zlib.h

          So you can either use mingw compiler instead as i think it has that file.
          or
          Read the documentationson GitHub or where the project lives and see
          what is suggested for the external dependencies.

          OR try to install zlib for windows and grab the file
          https://stackoverflow.com/questions/49634228/how-to-compile-zlib-into-a-dll-on-visual-studio-2017

          meh:: Too slow :)

          A Offline
          A Offline
          artwaw
          wrote on 30 Sept 2020, 12:02 last edited by
          #4

          @mrjj Quazip manual states (in the "Dependencies" section):
          Sometimes you can get away with using zlib library bundled into Qt, but usually you need at least its headers.

          So my advice would be to try just that.

          For more information please re-read.

          Kind Regards,
          Artur

          A 1 Reply Last reply 30 Sept 2020, 12:16
          2
          • A artwaw
            30 Sept 2020, 12:02

            @mrjj Quazip manual states (in the "Dependencies" section):
            Sometimes you can get away with using zlib library bundled into Qt, but usually you need at least its headers.

            So my advice would be to try just that.

            A Offline
            A Offline
            Anadeha
            wrote on 30 Sept 2020, 12:16 last edited by
            #5

            @artwaw Thank you for your answer, When I go to the header file, Zlib is already included.
            5b9a8105-26fd-4475-8018-ff9730ca8a26-image.png
            I don't know what to do

            J A 2 Replies Last reply 30 Sept 2020, 12:20
            0
            • A Anadeha
              30 Sept 2020, 12:16

              @artwaw Thank you for your answer, When I go to the header file, Zlib is already included.
              5b9a8105-26fd-4475-8018-ff9730ca8a26-image.png
              I don't know what to do

              J Offline
              J Offline
              JonB
              wrote on 30 Sept 2020, 12:20 last edited by
              #6

              @Anadeha
              Yes, but the error message says that file zlib.h cannot be found, at least in the path it indicates. So where is this file, and is its path found from your INCLUDE paths?

              1 Reply Last reply
              1
              • M mrjj
                30 Sept 2020, 11:59

                Hi
                As error says , visual studio cannot find the file zlib.h

                So you can either use mingw compiler instead as i think it has that file.
                or
                Read the documentationson GitHub or where the project lives and see
                what is suggested for the external dependencies.

                OR try to install zlib for windows and grab the file
                https://stackoverflow.com/questions/49634228/how-to-compile-zlib-into-a-dll-on-visual-studio-2017

                meh:: Too slow :)

                A Offline
                A Offline
                Anadeha
                wrote on 30 Sept 2020, 12:36 last edited by Anadeha
                #7

                @mrjj Thank you for your answer :) I try and it's working
                @JonB Thank you it's was ok
                @artwaw Thank you for helping me
                I try what you (all) said and it's working
                Sorry If I'm slow to asnwer ....

                d485e340-ab54-45f7-af5f-a1b0ba271319-image.png

                1 Reply Last reply
                0
                • A Anadeha
                  30 Sept 2020, 12:16

                  @artwaw Thank you for your answer, When I go to the header file, Zlib is already included.
                  5b9a8105-26fd-4475-8018-ff9730ca8a26-image.png
                  I don't know what to do

                  A Offline
                  A Offline
                  artwaw
                  wrote on 30 Sept 2020, 12:40 last edited by
                  #8

                  @Anadeha Hi again.
                  It is "included" in your sources but when the compiler tries to locate the file, it fails. Hence the error.
                  In your .pro file there is "INCLUDEPATH" variable - this is where the compiler searches for files.
                  Your project path folder is always included.

                  If you just downloaded the quazip it does not, very likely, include the zlib as it is a separate library. You need to download its sources, at the very least, then modify all the paths in your pro file to include those zlib sources. So, INCLUDEPATH at least.

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  A 1 Reply Last reply 30 Sept 2020, 12:48
                  4
                  • A artwaw
                    30 Sept 2020, 12:40

                    @Anadeha Hi again.
                    It is "included" in your sources but when the compiler tries to locate the file, it fails. Hence the error.
                    In your .pro file there is "INCLUDEPATH" variable - this is where the compiler searches for files.
                    Your project path folder is always included.

                    If you just downloaded the quazip it does not, very likely, include the zlib as it is a separate library. You need to download its sources, at the very least, then modify all the paths in your pro file to include those zlib sources. So, INCLUDEPATH at least.

                    A Offline
                    A Offline
                    Anadeha
                    wrote on 30 Sept 2020, 12:48 last edited by
                    #9

                    @artwaw Yes I'm going for it, thank you :)

                    1 Reply Last reply
                    1

                    8/9

                    30 Sept 2020, 12:40

                    • Login

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