Re: Help with installing KArchive

2024-02-19 Thread Albert Astals Cid
El diumenge, 18 de febrer de 2024, a les 20:30:57 (CET), Eric Ribble va 
escriure:
> I am a new user of Qt (using version 6.6) and Qt Creator  I would like to
> use KArchive to extract all folders and files from a zip file.  I found the
> example "karchive/examples/unzipper/main.cpp" source code.  However, I
> don't know how to download and install KArchive. I added the following to
> my project's "CMakeLists.txt" as described on the web
> page https://marketplace.qt.io/pages/karchiveinstructionspage :
> find_package(KF5Archive)

Your are trying to use KF5 KArchive in a Qt6 application.

You can't do that, KF5 needs Qt5.

You can try using the KF6 beta release of KArchive or wait until we release 
KF6 at the end of the month.

> target_link_libraries(Example4 KF5::Archive)
> Attached is my "CMakeLists.txt" file and "Main.cpp" file.
> In my "Main.cpp" the syntax-checker indicates that it can't find "kzip.h"
> (probably because I don't know how to download/install it). Here is a
> screenshot after trying to build:
> 
> Please advise on how to properly download/install KArchive so that this
> simple program will build.  Thanks for your help! Eric Ribble

This is not a KDE question, this is a "I understand how compiling things with 
cmake works" question.

The usual answer is that you run cmake && ninja && ninja install (replace 
ninja by make or if you really don't have any of those by cmake commands that 
will build and install) in karchive and then point the cmake of your 
application to that folder you installed karchive, either via a command line 
option or by hardcoding the path in the CMakeLists.txt file.

But Windows developers don't like that so you may have luck doing a cmake 
submodule thing, but then you're on your own, that's generally not how we use 
libraries.

Cheers,
  Albert




Re: Help with installing KArchive

2024-02-18 Thread Justin Zobel
If I may suggest joining the KDE Windows channel on Matrix. You can 
discuss there with KDE developers who are familiar with compiling KDE 
software on Windows. https://go.kde.org/matrix/#/#kde-windows:kde.org


On 19/2/24 13:05, Aaron Rainbolt wrote:


Oof, I didn't realize you were on Windows. I have no clue how Qt and 
KDE development works there since I don't use Windows anymore. If 
you're trying to code an application for Windows specifically, you'll 
probably need help from someone who knows how KDE app development 
works on Windows.


On 2/18/24 20:05, Eric Ribble wrote:

Hi Aaron,

Thanks for the quick response.  Unfortunately, I am not familiar with 
distro or Ubuntu or Debian.  My laptop is running Windows 11.  A few 
weeks ago I download and installed Qt6 and have been able to build a 
few simple Qt Windows applications.  I studied your email, googled 
'how to', etc., but finding it very difficult to simply download the 
KArchive library (KF6Archive (instead of KF5Archive)) and the 
"kzip.h" header file for usage with Qt6.


Any other suggestions?  Or do I need to figure out how to install/use 
Ubuntu on my Windows 11 laptop?


If you can't be of further help, I understand.

Eric

On Sunday, February 18, 2024 at 06:38:43 PM EST, Aaron Rainbolt 
 wrote:



On 2/18/24 13:30, Eric Ribble wrote:
I am a new user of Qt (using version 6.6) and Qt Creator  I would 
like to use KArchive to extract all folders and files from a zip 
file. I found the example "karchive/examples/unzipper/main.cpp" 
source code.  However, I don't know how to download and install KArchive.


What distro are you using?

In order to install a library in such a way that you can use it in 
new programs, you have to install both it and its development header 
files. There are generally two ways to do this:


* The easy way - install the development header package for your 
library of choice through your distro's package manager.
* The hard, dangerous way that you probably don't want yet - build 
the library from source and then either install it directly or figure 
out how to point your build system to it.


Obviously I'd recommend the former if you're just getting started. On 
Ubuntu, the package you want is called "libkf5archive-dev", and can 
be installed with "sudo apt install libkf5archive-dev". This will 
probably work on Debian too. If you're on some other distro, you'll 
need to find and install the right package.



I added the following to my project's "CMakeLists.txt" as described 
on the web page 
https://marketplace.qt.io/pages/karchiveinstructionspage 
 :


find_package(KF5Archive)
target_link_libraries(Example4 KF5::Archive)

Attached is my "CMakeLists.txt" file and "Main.cpp" file.

In my "Main.cpp" the syntax-checker indicates that it can't find 
"kzip.h" (probably because I don't know how to download/install it).


Here is a screenshot after trying to build:

Inline image

Please advise on how to properly download/install KArchive so that 
this simple program will build.  Thanks for your help!


Eric Ribble



--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub:https://github.com/ArrayBolt3  

--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub:https://github.com/ArrayBolt3

Re: Help with installing KArchive

2024-02-18 Thread Aaron Rainbolt
Oof, I didn't realize you were on Windows. I have no clue how Qt and KDE 
development works there since I don't use Windows anymore. If you're 
trying to code an application for Windows specifically, you'll probably 
need help from someone who knows how KDE app development works on Windows.


On 2/18/24 20:05, Eric Ribble wrote:

Hi Aaron,

Thanks for the quick response.  Unfortunately, I am not familiar with 
distro or Ubuntu or Debian.  My laptop is running Windows 11.  A few 
weeks ago I download and installed Qt6 and have been able to build a 
few simple Qt Windows applications.  I studied your email, googled 
'how to', etc., but finding it very difficult to simply download the 
KArchive library (KF6Archive (instead of KF5Archive)) and the "kzip.h" 
header file for usage with Qt6.


Any other suggestions?  Or do I need to figure out how to install/use 
Ubuntu on my Windows 11 laptop?


If you can't be of further help, I understand.

Eric

On Sunday, February 18, 2024 at 06:38:43 PM EST, Aaron Rainbolt 
 wrote:



On 2/18/24 13:30, Eric Ribble wrote:
I am a new user of Qt (using version 6.6) and Qt Creator  I would like 
to use KArchive to extract all folders and files from a zip file.  I 
found the example "karchive/examples/unzipper/main.cpp" source code. 
However, I don't know how to download and install KArchive.


What distro are you using?

In order to install a library in such a way that you can use it in new 
programs, you have to install both it and its development header 
files. There are generally two ways to do this:


* The easy way - install the development header package for your 
library of choice through your distro's package manager.
* The hard, dangerous way that you probably don't want yet - build the 
library from source and then either install it directly or figure out 
how to point your build system to it.


Obviously I'd recommend the former if you're just getting started. On 
Ubuntu, the package you want is called "libkf5archive-dev", and can be 
installed with "sudo apt install libkf5archive-dev". This will 
probably work on Debian too. If you're on some other distro, you'll 
need to find and install the right package.



I added the following to my project's "CMakeLists.txt" as described 
on the web page 
https://marketplace.qt.io/pages/karchiveinstructionspage 
 :


find_package(KF5Archive)
target_link_libraries(Example4 KF5::Archive)

Attached is my "CMakeLists.txt" file and "Main.cpp" file.

In my "Main.cpp" the syntax-checker indicates that it can't find 
"kzip.h" (probably because I don't know how to download/install it).


Here is a screenshot after trying to build:

Inline image

Please advise on how to properly download/install KArchive so that 
this simple program will build.  Thanks for your help!


Eric Ribble



--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub:https://github.com/ArrayBolt3  


--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub:https://github.com/ArrayBolt3



OpenPGP_0x84FC20D468BEFD4D.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Re: Help with installing KArchive

2024-02-18 Thread Eric Ribble
 Hi Aaron,
Thanks for the quick response.  Unfortunately, I am not familiar with distro or 
Ubuntu or Debian.  My laptop is running Windows 11.  A few weeks ago I download 
and installed Qt6 and have been able to build a few simple Qt Windows 
applications.  I studied your email, googled 'how to', etc., but finding it 
very difficult to simply download the KArchive library (KF6Archive (instead of 
KF5Archive)) and the "kzip.h" header file for usage with Qt6.
Any other suggestions?  Or do I need to figure out how to install/use Ubuntu on 
my Windows 11 laptop?
If you can't be of further help, I understand.
Eric 
On Sunday, February 18, 2024 at 06:38:43 PM EST, Aaron Rainbolt 
 wrote:  
 
  On 2/18/24 13:30, Eric Ribble wrote:
  
 
 I am a new user of Qt (using version 6.6) and Qt Creator  I would like to use 
KArchive to extract all folders and files from a zip file.  I found the example 
"karchive/examples/unzipper/main.cpp" source code.  However, I don't know how 
to download and install KArchive.  
What distro are you using?
 
In order to install a library in such a way that you can use it in new 
programs, you have to install both it and its development header files. There 
are generally two ways to do this:
 
* The easy way - install the development header package for your library of 
choice through your distro's package manager.
 * The hard, dangerous way that you probably don't want yet - build the library 
from source and then either install it directly or figure out how to point your 
build system to it.
 
Obviously I'd recommend the former if you're just getting started. On Ubuntu, 
the package you want is called "libkf5archive-dev", and can be installed with 
"sudo apt install libkf5archive-dev". This will probably work on Debian too. If 
you're on some other distro, you'll need to find and install the right package.

  
  I added the following to my project's "CMakeLists.txt" as described on the 
web page https://marketplace.qt.io/pages/karchiveinstructionspage : 
  find_package(KF5Archive)
target_link_libraries(Example4 KF5::Archive) 
   Attached is my "CMakeLists.txt" file and "Main.cpp" file. 
  In my "Main.cpp" the syntax-checker indicates that it can't find "kzip.h" 
(probably because I don't know how to download/install it). 
  Here is a screenshot after trying to build: 
   
  Please advise on how to properly download/install KArchive so that this 
simple program will build.  Thanks for your help! 
  Eric Ribble 
 
   
 -- 
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub: https://github.com/ArrayBolt3   

Re: Help with installing KArchive

2024-02-18 Thread Aaron Rainbolt

On 2/18/24 13:30, Eric Ribble wrote:
I am a new user of Qt (using version 6.6) and Qt Creator  I would like 
to use KArchive to extract all folders and files from a zip file.  I 
found the example "karchive/examples/unzipper/main.cpp" source code. 
However, I don't know how to download and install KArchive.


What distro are you using?

In order to install a library in such a way that you can use it in new 
programs, you have to install both it and its development header files. 
There are generally two ways to do this:


* The easy way - install the development header package for your library 
of choice through your distro's package manager.
* The hard, dangerous way that you probably don't want yet - build the 
library from source and then either install it directly or figure out 
how to point your build system to it.


Obviously I'd recommend the former if you're just getting started. On 
Ubuntu, the package you want is called "libkf5archive-dev", and can be 
installed with "sudo apt install libkf5archive-dev". This will probably 
work on Debian too. If you're on some other distro, you'll need to find 
and install the right package.


I added the following to my project's "CMakeLists.txt" as described on 
the web page https://marketplace.qt.io/pages/karchiveinstructionspage :


find_package(KF5Archive)
target_link_libraries(Example4 KF5::Archive)

Attached is my "CMakeLists.txt" file and "Main.cpp" file.

In my "Main.cpp" the syntax-checker indicates that it can't find 
"kzip.h" (probably because I don't know how to download/install it).


Here is a screenshot after trying to build:

Inline image

Please advise on how to properly download/install KArchive so that 
this simple program will build.  Thanks for your help!


Eric Ribble



--
Aaron Rainbolt
Lubuntu Developer
Matrix: @arraybolt3:matrix.org
IRC: arraybolt3 on irc.libera.chat
GitHub:https://github.com/ArrayBolt3



OpenPGP_0x84FC20D468BEFD4D.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature