Results 1 to 2 of 2

Thread: Compiling KArchive

  1. #1
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    256
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Compiling KArchive

    without success, I need help of experienced.

    I need .zip support in my app. In Qt4, it was simple: install kdelibs5-dev and link with libkdecore.so . Doing the same in Qt5 results in an immediate crash.

    There is KArchive on inqlude. I downloaded it and tried to build it using included instructions. The build failed because I didn't have ECMConfig.cmake. Searching what it is all about, I have found I need extra-cmake-modules package, which isn't in the repository but which is on inqlude (in sources) - now without any instructions what to do with it. I tried to create a buid directory and commanded cmake .. from it. It failed, too, because I haven't something else. Oh well, install qttools5-dev and qttools5-dev-tools and cmake .. will pass. Now I seem to have ECMConfig.cmake but on a wrong place.

    Q: Supposing cmake .. was a correct idea, where to copy the contents of the build directory of extra-cmake-modules?
    Q: Will KArchive buid now? Or I need to install something before building?

    In the meantime, I tried to make a Qt5 project from the KArchive sources and create a static library. With some problems, I was seemingly successful in the end. Linking the library with my app failed with unresolved external (init2) in a private header (kgzipfilter.h). So it isn't so simple. I also tried kdelibs5-dev again (in installs lots of Qt4, that's why I tried to avoid kdelibs5-dev) but with the known result (immediate crash).

  2. #2
    Join Date
    Apr 2013
    Location
    Prague
    Posts
    256
    Thanks
    3
    Thanked 65 Times in 59 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Compiling KArchive

    Solution found. Do no lose nerves with compiling if you do not have framework environment installed. KArchive is in experimental repository (which you haven't subscribed if you use the stable environment). Search libkf5archive and libkf5archive-dev packages (.deb packages) on the web. Select a seriously looking source (for example, debian itself), download, ignore warnings on possible bugs (basic tasks like reading a .zip will work surely - and they do), and install. Add KArchive on the QT line of your project:
    Qt Code:
    1. QT += core gui widgets KArchive
    To copy to clipboard, switch view to plain text mode 
    Done. You can compile apps with .zip support using KArchive API. No need of specifying additional libraries or includes. A big sigh of relief

  3. The following 2 users say thank you to Radek for this useful post:

    boudie (19th June 2015), d_stranz (18th June 2015)

Similar Threads

  1. compiling under qt4 AND qt5
    By drhex in forum Qt Programming
    Replies: 3
    Last Post: 16th March 2013, 23:37
  2. compiling qt in 64b on mac
    By eric_vi in forum Qt Programming
    Replies: 2
    Last Post: 23rd January 2010, 14:42
  3. compiling 4.4.1
    By LordQt in forum Installation and Deployment
    Replies: 10
    Last Post: 29th September 2008, 09:27
  4. Help compiling in qt 4
    By paul_1995 in forum Qt Programming
    Replies: 1
    Last Post: 11th August 2008, 15:39
  5. Compiling?
    By Afflicted.d2 in forum Newbie
    Replies: 7
    Last Post: 16th October 2006, 19:32

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.