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. Project ERROR: Unknown module(s) in QT: KArchive
QtWS25 Last Chance

Project ERROR: Unknown module(s) in QT: KArchive

Scheduled Pinned Locked Moved Solved General and Desktop
13 Posts 4 Posters 1.7k 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
    Abdulmueez
    wrote on last edited by Abdulmueez
    #1

    After installing KArchive on my windows, I am still getting the error,

    Project ERROR: Unknown module(s) in QT: KArchive
    

    What should I do next please or what am I doing wrong?

    aha_1980A 1 Reply Last reply
    0
    • A Abdulmueez

      After installing KArchive on my windows, I am still getting the error,

      Project ERROR: Unknown module(s) in QT: KArchive
      

      What should I do next please or what am I doing wrong?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @abdulmueez,

      • how did you install the library?
      • have you checked that the include files, lib and dll files have been copied to your Qt installations respective directories?
      • on Windows, you need separate files for debug and release builds. Can you check the other build type and see if that works?

      Regards

      Qt has to stay free or it will die.

      1 Reply Last reply
      2
      • A Offline
        A Offline
        Abdulmueez
        wrote on last edited by
        #3
        • Installed it according to the instructions in the website https://wiki.qt.io/Karchive_on_windows

        • Do I have to manually include all the files, lib and dll and if yes, to which directories exactly?

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

          Hi,

          Can you share your .pro file ?

          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
          • A Offline
            A Offline
            Abdulmueez
            wrote on last edited by
            #5
            QT += quick xml svg KArchive
            CONFIG += c++11
            # The following define makes your compiler emit warnings if you use
            # any Qt feature that has been marked deprecated (the exact warnings
            # depend on your compiler). Refer to the documentation for the
            # deprecated API to know how to port your code away from it.
            DEFINES += QT_DEPRECATED_WARNINGS
            
            # You can also make your code fail to compile if it uses deprecated APIs.
            # In order to do so, uncomment the following line.
            # You can also select to disable deprecated APIs only up to a certain version of Qt.
            #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
            
            SOURCES += \
                    epubcontainer.cpp \
                    epubdocument.cpp \
                    main.cpp
            
            RESOURCES += qml.qrc
            
            # Additional import path used to resolve QML modules in Qt Creator's code model
            QML_IMPORT_PATH =
            
            # Additional import path used to resolve QML modules just for Qt Quick Designer
            QML_DESIGNER_IMPORT_PATH =
            
            # Default rules for deployment.
            qnx: target.path = /tmp/$${TARGET}/bin
            else: unix:!android: target.path = /opt/$${TARGET}/bin
            !isEmpty(target.path): INSTALLS += target
            
            HEADERS += \
                epubcontainer.h \
                epubdocument.h
            
            
            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Did you check on your system for the presence of a KArchive.pri file ?

              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
              • A Offline
                A Offline
                Abdulmueez
                wrote on last edited by
                #7

                0_1565558691725_Screenshot (28).png

                I found these 2 .pri files, Are they the ones ?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  Abdulmueez
                  wrote on last edited by
                  #8

                  So, I found a possible solution that involves including the pri files in the pro file of my project,

                  include(C:/Users/emiol/OneDrive/Desktop/Git/kaarchive/build/src/qt_KArchive.pri)
                  

                  These removes the above error, but I can't still make use of the headers(KZip,karchivedirectory,...), there files are not found.

                  I think the errors are from the pri files, the headers ain't included in it, Here is the content

                  QT.KArchive.VERSION = 5.61.0
                  QT.KArchive.MAJOR_VERSION = 5
                  QT.KArchive.MINOR_VERSION = 61
                  QT.KArchive.PATCH_VERSION = 0
                  QT.KArchive.name = KF5Archive
                  QT.KArchive.module = KF5Archive
                  QT.KArchive.defines = 
                  QT.KArchive.includes = C:-DCMAKE_BUILD_TYPE=release/include/KF5/KArchive
                  QT.KArchive.private_includes =
                  QT.KArchive.libs = C:-DCMAKE_BUILD_TYPE=release/lib
                  QT.KArchive.depends = core
                  
                  HEADERS +=
                  
                  ``
                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    Did you call make install after building the module ?

                    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
                    • A Offline
                      A Offline
                      Abdulmueez
                      wrote on last edited by
                      #10

                      Yes, I did that

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Abdulmueez
                        wrote on last edited by Abdulmueez
                        #11

                        So, I manually added the files and I have this,
                        I'm not sure I did the right thing, Is the format of the pri file correct now?
                        This doesn't solve the error though, I just want to know whether I'm thinking in the right direction?

                        QT.KArchive.VERSION = 5.61.0
                        QT.KArchive.MAJOR_VERSION = 5
                        QT.KArchive.MINOR_VERSION = 61
                        QT.KArchive.PATCH_VERSION = 0
                        QT.KArchive.name = KF5Archive
                        QT.KArchive.module = KF5Archive
                        QT.KArchive.defines = 
                        QT.KArchive.includes = C:-DCMAKE_BUILD_TYPE=release/include/KF5/KArchive
                        QT.KArchive.private_includes =
                        QT.KArchive.libs = C:-DCMAKE_BUILD_TYPE=release/lib
                        QT.KArchive.depends = core
                        HEADERS +=\
                            $$PWD/../../../../src/k7zip.h \
                            $$PWD/../../../../src/kar.h \
                            $$PWD/../../../../src/karchive.h \
                            $$PWD/../../../../src/karchive_p.h \
                            $$PWD/../../../../src/karchivedirectory.h \
                            $$PWD/../../../../src/karchiveentry.h \
                            $$PWD/../../../../src/karchivefile.h \
                            $$PWD/../../../../src/kbzip2filter.h \
                            $$PWD/../../../../src/kcompressiondevice.h \
                            $$PWD/../../../../src/kcompressiondevice_p.h \
                            $$PWD/../../../../src/kfilterbase.h \
                            $$PWD/../../../../src/kfilterdev.h \
                            $$PWD/../../../../src/kgzipfilter.h \
                            $$PWD/../../../../src/klimitediodevice_p.h \
                            $$PWD/../../../../src/knonefilter.h \
                            $$PWD/../../../../src/krcc.h \
                            $$PWD/../../../../src/ktar.h \
                            $$PWD/../../../../src/kxzfilter.h \
                            $$PWD/../../../../src/kzipfileentry.h
                        
                        SOURCES += \
                            $$PWD/../../../../src/k7zip.cpp \
                            $$PWD/../../../../src/kar.cpp \
                            $$PWD/../../../../src/karchive.cpp \
                            $$PWD/../../../../src/kbzip2filter.cpp \
                            $$PWD/../../../../src/kcompressiondevice.cpp \
                            $$PWD/../../../../src/kfilterbase.cpp \
                            $$PWD/../../../../src/kfilterdev.cpp \
                            $$PWD/../../../../src/kgzipfilter.cpp \
                            $$PWD/../../../../src/klimitediodevice.cpp \
                            $$PWD/../../../../src/knonefilter.cpp \
                            $$PWD/../../../../src/krcc.cpp \
                            $$PWD/../../../../src/ktar.cpp \
                            $$PWD/../../../../src/kxzfilter.cpp \
                            $$PWD/../../../../src/kzip.cpp
                        
                        
                        1 Reply Last reply
                        0
                        • VRoninV Offline
                          VRoninV Offline
                          VRonin
                          wrote on last edited by VRonin
                          #12

                          Building KArchive on windows is not trivial and that article is badly out of date.
                          You can download a pre-built version for MSVC2017 from here (expires in 6 months):

                          • 32bit
                          • 64bit

                          Then unpack it and add the below to your project (.pro) file (this assumes you uncompressed the library in C:\KDE)

                          LIBS += -LC:/KDE/lib
                          INCLUDEPATH +=  C:/KDE/include/KF5/KArchive
                          CONFIG(release, debug|release) {
                          LIBS += -lKF5Archive
                          }
                          CONFIG(debug, debug|release) {
                          LIBS += -lKF5Archived
                          }
                          

                          "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                          ~Napoleon Bonaparte

                          On a crusade to banish setIndexWidget() from the holy land of Qt

                          1 Reply Last reply
                          3
                          • A Offline
                            A Offline
                            Abdulmueez
                            wrote on last edited by
                            #13

                            Thanks a lot, It works fine now.
                            I really appreciate all thehelp

                            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