Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Qt Project using libarchive on Windows

Qt Project using libarchive on Windows

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 2 Posters 1.4k 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.
  • T Offline
    T Offline
    taraj
    wrote on last edited by
    #1

    Hi,

    I am a Linux user but have to get a project (which works on Linux) running on Windows 10 using libarchive and I am a bit lost.
    Kits available: Qt5.9.9 MSVC 2017 64 bit or Qt5.9.9 MinGW 32bit
    I'm not 100% sure that I have installed libarchive correctly (not sure which type of installation I should be running, binary, developer???) Some advice on that would be great.. just put it in Program Files dir?

    In Qt Creator I have done an "Add Library" on the project and added an External Library (undecided as weather to use dynamic or static yet... )which gave me this:

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dlld
    else:unix:!macx: LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
    
    INCLUDEPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
    DEPENDPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
    

    I also have:

    INCLUDEPATH += C:\DevTools\ProgramFiles(x86)\libarchive-v3.4.3-win64\libarchive\include
    

    if fails on the -llibarchive.dlld as it doesn't exist... if I remove then I get the following error:

    C:\X\DBuilder\archiver.cpp:123: error: undefined reference to `archive_write_free'
    

    I have archive.h and archive_entry.h defined at the top of the file that uses the archive_write_free command...

    #include <archive.h>
    #include <archive_entry.h>
    

    adding full path here doesn't made any difference.

    Can't seem to get past this and wondering what I have done wrong...

    Thanks in advance!!!

    jsulmJ 2 Replies Last reply
    0
    • T taraj

      Hi,

      I am a Linux user but have to get a project (which works on Linux) running on Windows 10 using libarchive and I am a bit lost.
      Kits available: Qt5.9.9 MSVC 2017 64 bit or Qt5.9.9 MinGW 32bit
      I'm not 100% sure that I have installed libarchive correctly (not sure which type of installation I should be running, binary, developer???) Some advice on that would be great.. just put it in Program Files dir?

      In Qt Creator I have done an "Add Library" on the project and added an External Library (undecided as weather to use dynamic or static yet... )which gave me this:

      win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
      else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dlld
      else:unix:!macx: LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
      
      INCLUDEPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
      DEPENDPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
      

      I also have:

      INCLUDEPATH += C:\DevTools\ProgramFiles(x86)\libarchive-v3.4.3-win64\libarchive\include
      

      if fails on the -llibarchive.dlld as it doesn't exist... if I remove then I get the following error:

      C:\X\DBuilder\archiver.cpp:123: error: undefined reference to `archive_write_free'
      

      I have archive.h and archive_entry.h defined at the top of the file that uses the archive_write_free command...

      #include <archive.h>
      #include <archive_entry.h>
      

      adding full path here doesn't made any difference.

      Can't seem to get past this and wondering what I have done wrong...

      Thanks in advance!!!

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

      @taraj said in Qt Project using libarchive on Windows:

      libarchive

      What compiler was used to build this library? On Windows you have to use same compiler for C++. Also, did you make sure that the path to the lib is correct (check the build log to see the actual paths).

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

      1 Reply Last reply
      1
      • T Offline
        T Offline
        taraj
        wrote on last edited by
        #3

        I haven't used a compiler to build the libarchive. I have used the binary that is available: libarchive-v3.4.3-win64
        This is something i am unsure about, i'm not sure if i have to compile libarchive - if so, what, where, how, I found the installation instructions overwhelming and very complex (compared to linux) so went with the binary.

        jsulmJ 1 Reply Last reply
        0
        • T taraj

          I haven't used a compiler to build the libarchive. I have used the binary that is available: libarchive-v3.4.3-win64
          This is something i am unsure about, i'm not sure if i have to compile libarchive - if so, what, where, how, I found the installation instructions overwhelming and very complex (compared to linux) so went with the binary.

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

          @taraj said in Qt Project using libarchive on Windows:

          I haven't used a compiler to build the libarchive

          I didn't say that you did. But somebody did.
          From where did you download the lib?
          You also did not answer my last question.

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

          1 Reply Last reply
          0
          • T Offline
            T Offline
            taraj
            wrote on last edited by
            #5

            I got it from here http://gnuwin32.sourceforge.net/packages/libarchive.htm
            same is also available here https://libarchive.org/

            1 Reply Last reply
            0
            • T taraj

              Hi,

              I am a Linux user but have to get a project (which works on Linux) running on Windows 10 using libarchive and I am a bit lost.
              Kits available: Qt5.9.9 MSVC 2017 64 bit or Qt5.9.9 MinGW 32bit
              I'm not 100% sure that I have installed libarchive correctly (not sure which type of installation I should be running, binary, developer???) Some advice on that would be great.. just put it in Program Files dir?

              In Qt Creator I have done an "Add Library" on the project and added an External Library (undecided as weather to use dynamic or static yet... )which gave me this:

              win32:CONFIG(release, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
              else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dlld
              else:unix:!macx: LIBS += -L$$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/lib/' -llibarchive.dll
              
              INCLUDEPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
              DEPENDPATH += $$PWD/'../ProgramFiles(x86)/libarchive-2.4.12-1-bin/include'
              

              I also have:

              INCLUDEPATH += C:\DevTools\ProgramFiles(x86)\libarchive-v3.4.3-win64\libarchive\include
              

              if fails on the -llibarchive.dlld as it doesn't exist... if I remove then I get the following error:

              C:\X\DBuilder\archiver.cpp:123: error: undefined reference to `archive_write_free'
              

              I have archive.h and archive_entry.h defined at the top of the file that uses the archive_write_free command...

              #include <archive.h>
              #include <archive_entry.h>
              

              adding full path here doesn't made any difference.

              Can't seem to get past this and wondering what I have done wrong...

              Thanks in advance!!!

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

              @taraj said in Qt Project using libarchive on Windows:

              fails on the -llibarchive.dlld as it doesn't exist

              Try to build in release mode.

              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