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. Quazip not building up: Throwing "Undefined symbols for architecture x86_64"

Quazip not building up: Throwing "Undefined symbols for architecture x86_64"

Scheduled Pinned Locked Moved General and Desktop
14 Posts 10 Posters 11.0k 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.
  • V Offline
    V Offline
    VikramS
    wrote on last edited by
    #1

    I am trying to build the QuaZip library in QT Creator 2.4.1 in a MAC 10.7.2 system without making any changes to the project at all, but i am getting the following error

    Undefined symbols for architecture x86_64:
    @
    "inflateInit2", referenced from:
    _unzOpenCurrentFile3 in unzip.o
    "_get_crc_table", referenced from:
    _unzOpenCurrentFile3 in unzip.o
    _zipOpenNewFileInZip3 in zip.o
    "_crc32", referenced from:
    _unzReadCurrentFile in unzip.o
    _zipWriteInFileInZip in zip.o
    QuaCrc32::update(QByteArray const&) in quacrc32.o
    QuaCrc32::reset() in quacrc32.o
    QuaCrc32::calculate(QByteArray const&) in quacrc32.o
    "_inflate", referenced from:
    _unzReadCurrentFile in unzip.o
    "_inflateEnd", referenced from:
    _unzCloseCurrentFile in unzip.o
    "deflateInit2", referenced from:
    _zipOpenNewFileInZip3 in zip.o
    "_deflate", referenced from:
    _zipWriteInFileInZip in zip.o
    _zipCloseFileInZipRaw in zip.o
    "_deflateEnd", referenced from:
    _zipCloseFileInZipRaw in zip.o
    "_adler32", referenced from:
    QuaAdler32::update(QByteArray const&) in quaadler32.o
    QuaAdler32::reset() in quaadler32.o
    QuaAdler32::calculate(QByteArray const&) in quaadler32.o
    ld: symbol(s) not found for architecture x86_64

    collect2: ld returned 1 exit status
    make: Leaving directory `/Users/vikram.sridhar/Documents/Workspace/quazip-build-desktop-Desktop_Qt_4_8_1_for_GCC__Qt_SDK__Debug'
    make: *** [libquazip.1.0.0.dylib] Error 1
    13:37:14: The process "/usr/bin/make" exited with code 2.
    Error while building project quazip (target: Desktop)
    When executing build step 'Make'@

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tucnak
      wrote on last edited by
      #2

      It means that this library can't be built on your system.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        goetz
        wrote on last edited by
        #3

        The error means that the linker is trying to find the code for some symbols, but fails to do so. The lib (zlib) is installed on your system, otherwise the compiler would have bailed out already (due to missing include files). Fortunately the solution is easy: The developers forgot to include linkage to zlib in the .pro file, so just add to the file mvim quazip/quazip.pro the following line in the unix scope:

        @
        LIBS += -lz
        @

        The complete snippet that works for me (I had the very same errors on a 10.6 Mac box) is:

        @
        unix:!symbian {
        headers.path=$$PREFIX/include/quazip
        headers.files=$$HEADERS
        target.path=$$PREFIX/lib
        INSTALLS += headers target
        // the following line needs to be added
        LIBS += -lz

        OBJECTS_DIR=.obj
        MOC_DIR=.moc

        }
        @

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        1
        • C Offline
          C Offline
          continuata
          wrote on last edited by
          #4

          Volker, you just saved me after a weekend of pain ... was having exactly the same issue, couldn't figure it out.

          Was even considering completely different approaches ... thank you so much!

          1 Reply Last reply
          0
          • G Offline
            G Offline
            goetz
            wrote on last edited by
            #5

            You're welcome - that's what these forums have been made for :-)

            http://www.catb.org/~esr/faqs/smart-questions.html

            1 Reply Last reply
            0
            • H Offline
              H Offline
              Holly.Deng
              wrote on last edited by
              #6

              Hi,Volker. I'm a novice in using Qt creator. I have the same problem which confused me for two days. Thank you so much for your answer. Thank you !

              1 Reply Last reply
              0
              • D Offline
                D Offline
                drpclind
                wrote on last edited by
                #7

                Thanks, Volker, for the information about needing to add "LIBS += -lz". That worked perfectly, and saved me a lot of time!

                1 Reply Last reply
                0
                • Y Offline
                  Y Offline
                  Yash
                  wrote on last edited by
                  #8

                  Thank you Volker

                  http://kineticwing.com : Web IDE, QSS Editor
                  http://speedovation.com : Development Lab

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    karlox
                    wrote on last edited by
                    #9

                    Thank you Wolker this help me too. I'm fresh on Mac and some erro messages get me on the wrong way

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

                      Thank you Wolker this help me too. I'm fresh on Mac and some erro messages get me on the wrong way

                      1 Reply Last reply
                      0
                      • L Offline
                        L Offline
                        Leanor
                        wrote on last edited by
                        #11

                        Hi , please anybody can help me, how to solve this issue when I'm using CMake and not qmake?

                        jsulmJ 1 Reply Last reply
                        0
                        • L Leanor

                          Hi , please anybody can help me, how to solve this issue when I'm using CMake and not qmake?

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

                          @Leanor This is quite old thread. Please provide more information about your situation:

                          • What OS?
                          • What Qt version?
                          • What exact error messages do you get?

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

                          L 1 Reply Last reply
                          0
                          • jsulmJ jsulm

                            @Leanor This is quite old thread. Please provide more information about your situation:

                            • What OS?
                            • What Qt version?
                            • What exact error messages do you get?
                            L Offline
                            L Offline
                            Leanor
                            wrote on last edited by
                            #13
                            This post is deleted!
                            jsulmJ 1 Reply Last reply
                            0
                            • L Leanor

                              This post is deleted!

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

                              @Leanor Seems like you do not link the quazip libs.
                              Show your pro file.

                              Also

                              #include <QuaZip-Qt5-1.3/quazip/quazip.h>
                              

                              this should look differently:

                              #include <quazip/quazip.h>
                              

                              just add QuaZip-Qt5-1.3 as include path in your pro file.

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

                              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