Using quazip on mac



  • hi to every one
    i want to use a quazip library on macintosh 10.6.2
    i was compiled the library and it created it successfully
    but when i want to compile the test project it get me this error
    the library -lquazip not found
    how can i solve that?
    i was compiled with qt creator
    how can i use this lib on mac?



  • As always with that error message: add the path to the LIBS path:

    @
    LIBS += /path/to/your/lib -lquazip
    @



  • i have done this but it doesn't have any differences
    @TEMPLATE = app
    QT -= gui
    CONFIG += release
    TARGET =
    DEPENDPATH += .
    INCLUDEPATH += . ..
    LIBS += /Users/mahmood1/qt/quazip-0.4.3/quazip-build-desktop -lquazip

    Input

    HEADERS += testquazip.h
    testquazipfile.h
    testquachecksum32.h
    testjlcompress.h
    qztest.h
    SOURCES += testquazip.cpp
    testquazipfile.cpp
    testquachecksum32.cpp
    testjlcompress.cpp
    qztest.cpp@
    what should i do?



  • when i use this line
    @LIBS += $$quote(-L/Users/mahmood1/qt/quazip-0.4.3/quazip-build-desktop) -lquazip@
    it get me this error
    @Running build steps for project qztest...
    Configuration unchanged, skipping qmake step.
    Starting: "/usr/bin/make" -w
    make: Entering directory /Users/mahmood1/qt/quazip-0.4.3/qztest-build-desktop' /usr/bin/qmake -spec /usr/local/Qt4.7/mkspecs/macx-g++ -o Makefile ../test/qztest.pro make: Leaving directory/Users/mahmood1/qt/quazip-0.4.3/qztest-build-desktop'
    make: Entering directory `/Users/mahmood1/qt/quazip-0.4.3/qztest-build-desktop'
    g++ -headerpad_max_install_names -arch i386 -o qztest.app/Contents/MacOS/qztest testquazip.o testquazipfile.o testquachecksum32.o testjlcompress.o qztest.o moc_testquazip.o moc_testquazipfile.o moc_testquachecksum32.o moc_testjlcompress.o -F/Library/Frameworks -L/Library/Frameworks -L/Users/mahmood1/qt/quazip-0.4.3/quazip-build-desktop -lquazip -framework QtCore
    Undefined symbols:
    "QTest::qExec(QObject*, QStringList const&)", referenced from:
    _main in qztest.o
    _main in qztest.o
    _main in qztest.o
    _main in qztest.o
    "char* QTest::toString<int>(int const&)", referenced from:
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazipfile.o@



  • @ bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testjlcompress.o
    "char* QTest::toString<unsigned int>(unsigned int const&)", referenced from:
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int)in testquachecksum32.o
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int)in testquachecksum32.o
    "QTestData::append(int, void const*)", referenced from:
    operator<<(QTestData&, char const*)in testquazip.o
    QTestData& operator<< <QStringList>(QTestData&, QStringList const&)in testquazip.o
    operator<<(QTestData&, char const*)in testquazipfile.o
    QTestData& operator<< <QStringList>(QTestData&, QStringList const&)in testquazipfile.o
    QTestData& operator<< <QByteArray>(QTestData&, QByteArray const&)in testquazipfile.o
    operator<<(QTestData&, char const*)in testjlcompress.o
    QTestData& operator<< <QStringList>(QTestData&, QStringList const&)in testjlcompress.o
    "QTest::addColumnInternal(int, char const*)", referenced from:
    void QTest::addColumn<QString>(char const*, QString*)in testquazip.o
    void QTest::addColumn<QStringList>(char const*, QStringList*)in testquazip.o
    void QTest::addColumn<QString>(char const*, QString*)in testquazipfile.o
    void QTest::addColumn<QStringList>(char const*, QStringList*)in testquazipfile.o
    void QTest::addColumn<QByteArray>(char const*, QByteArray*)in testquazipfile.o
    void QTest::addColumn<QString>(char const*, QString*)in testjlcompress.o
    void QTest::addColumn<QStringList>(char const*, QStringList*)in testjlcompress.o
    "QTest::qFail(char const*, char const*, int)", referenced from:
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    @



  • @ TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::compressFiles() in testjlcompress.o
    TestJlCompress::compressFiles() in testjlcompress.o
    TestJlCompress::compressDir() in testjlcompress.o
    TestJlCompress::compressDir() in testjlcompress.o
    "char* QTest::toString<long long>(long long const&)", referenced from:
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testjlcompress.o
    "QTest::qData(char const*, int)", referenced from:
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::compressFiles() in testjlcompress.o
    TestJlCompress::compressFiles() in testjlcompress.o
    TestJlCompress::compressDir() in testjlcompress.o
    TestJlCompress::compressDir() in testjlcompress.o
    "QTest::compare_helper(bool, char const*, char*, char*, char const*, char const*, char const*, int)", referenced from:
    bool QTest::qCompare<QString>(QString const&, QString const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<QString>(QString const&, QString const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazipfile.o
    @



  • @ bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<bool>(bool const&, bool const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int)in testquachecksum32.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testjlcompress.o
    "QTest::qt_snprintf(char*, int, char const*, ...)", referenced from:
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testjlcompress.o
    "QTest::qVerify(bool, char const*, char const*, char const*, int)", referenced from:
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZip::getFileList() in testquazip.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::pos() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::atEnd() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::bytesAvailable() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestQuaZipFile::zipUnzip() in testquazipfile.o
    TestJlCompress::extractFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::compressFile() in testjlcompress.o
    TestJlCompress::extractDir() in testjlcompress.o
    TestJlCompress::extractFiles() in testjlcompress.o
    TestJlCompress::compressFiles() in testjlcompress.o
    TestJlCompress::compressDir() in testjlcompress.o
    "QTest::compare_helper(bool, char const*, char const*, int)", referenced from:
    bool QTest::qCompare<QString>(QString const&, QString const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazip.o
    bool QTest::qCompare<QString>(QString const&, QString const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<bool>(bool const&, bool const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<unsigned int>(unsigned int const&, unsigned int const&, char const*, char const*, char const*, int)in testquachecksum32.o
    bool QTest::qCompare<int>(int const&, int const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<QStringList>(QStringList const&, QStringList const&, char const*, char const*, char const*, int)in testjlcompress.o
    bool QTest::qCompare<long long>(long long const&, long long const&, char const*, char const*, char const*, int)in testjlcompress.o
    "QTest::newRow(char const*)", referenced from:
    TestQuaZip::getFileList_data() in testquazip.o
    TestQuaZipFile::bytesAvailable_data() in testquazipfile.o
    TestQuaZipFile::zipUnzip_data() in testquazipfile.o
    TestQuaZipFile::zipUnzip_data() in testquazipfile.o
    TestJlCompress::compressFile_data() in testjlcompress.o
    TestJlCompress::extractDir_data() in testjlcompress.o
    TestJlCompress::extractFiles_data() in testjlcompress.o
    TestJlCompress::extractFile_data() in testjlcompress.o
    TestJlCompress::compressDir_data() in testjlcompress.o
    TestJlCompress::compressFiles_data() in testjlcompress.o
    TestJlCompress::compressFiles_data() in testjlcompress.o
    "char* QTest::toString<bool>(bool const&)", referenced from:
    bool QTest::qCompare<bool>(bool const&, bool const&, char const*, char const*, char const*, int)in testquazipfile.o
    bool QTest::qCompare<bool>(bool const&, bool const&, char const*, char const*, char const*, int)in testquazipfile.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make: *** [qztest.app/Contents/MacOS/qztest] Error 1
    make: Leaving directory `/Users/mahmood1/qt/quazip-0.4.3/qztest-build-desktop'
    The process "/usr/bin/make" exited with code 2.
    Error while building project qztest (target: Desktop)
    When executing build step 'Make'@@



  • QTestLib symbols are missing, which is quite obvious to see in this error messages.

    Add this to your .pro file:

    @
    QT += testlib
    @



  • thanks alot.
    it solved my problem


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.