Qt and pkg-config
-
Hi,
Run
pkg-config --list-all
to check if you have Qt Libraries installed there.Are you targeting your distribution provided Qt ?
Are you using a manually written Makefile ?@SGaist said in Qt and pkg-config:
Hi,
Run
pkg-config --list-all
to check if you have Qt Libraries installed there.Will check it tonight.
Also, I do have them installed (and I ran KDE WM).However, running "pkg-config --cxxflags" gives an error.
Unfortunately I'm at work and not in front of that machine.Are you targeting your distribution provided Qt ?
Yes. Also, iot is possible to have 2 versions installed, right?
Are you using a manually written Makefile ?
No. My Makefile is generated by Anjuta IDE.
-
I would recommend moving to a project management tool like cmake. It will allow you to more easily switch between different versions of a framework like Qt.
-
I would recommend moving to a project management tool like cmake. It will allow you to more easily switch between different versions of a framework like Qt.
Hi,
@SGaist said in Qt and pkg-config:I would recommend moving to a project management tool like cmake. It will allow you to more easily switch between different versions of a framework like Qt.
I'm still doing development and testing.
CMake is a good tool to create a distribution Makefile when everything is already done and ready to be shipped.
I will update the thread with the info running pkg-config when I get home.
Thank you.
-
@oneeyeman1 said in Qt and pkg-config:
CMake is a good tool to create a distribution Makefile when everything is already done and ready to be shipped.
No no, it's a tool to use from the start to manage your project and its dependencies.
-
@oneeyeman1 said in Qt and pkg-config:
CMake is a good tool to create a distribution Makefile when everything is already done and ready to be shipped.
No no, it's a tool to use from the start to manage your project and its dependencies.
Hi,
@SGaist said in Qt and pkg-config:@oneeyeman1 said in Qt and pkg-config:
CMake is a good tool to create a distribution Makefile when everything is already done and ready to be shipped.
No no, it's a tool to use from the start to manage your project and its dependencies.
Then what is IDE for?
It is not to just edit and debug the code, it is also a tool to generate the project and create an appropriate Makefile.Thank you.
-
Hi,
@SGaist said in Qt and pkg-config:@oneeyeman1 said in Qt and pkg-config:
CMake is a good tool to create a distribution Makefile when everything is already done and ready to be shipped.
No no, it's a tool to use from the start to manage your project and its dependencies.
Then what is IDE for?
It is not to just edit and debug the code, it is also a tool to generate the project and create an appropriate Makefile.Thank you.
@oneeyeman1 said in Qt and pkg-config:
It is not to just edit and debug the code, it is also a tool to generate the project and create an appropriate Makefile.
No, in QtCreator this is done ether by qmake or cmake. QtCreator itself does not generate any makefiles. Why should it if there are already build tools like qmake/cmake? This also applies to most other IDEs, even Microsoft Visual Studio which uses MSBuild and also supports CMake.
-
@oneeyeman1 said in Qt and pkg-config:
It is not to just edit and debug the code, it is also a tool to generate the project and create an appropriate Makefile.
No, in QtCreator this is done ether by qmake or cmake. QtCreator itself does not generate any makefiles. Why should it if there are already build tools like qmake/cmake? This also applies to most other IDEs, even Microsoft Visual Studio which uses MSBuild and also supports CMake.
Hi,
@jsulmI don't know anything about QtCreator.
All I know is that when I try to create a solution in MSVC it will crete a project and then I will set the appropriate include/lib options.Xcode is kind of the same way.
In Anjuta I create a workspace, add the project(s) and it will generate the Makefile for the build, based on the appropriate template.
Thank you.
P.S.: Now, all I need is to ask the shell where the Qt headers/libraries are...
-
Xcode as well as Visual Studio have concepts of higher level projects.
It looks like Anjuta hasn't seen an update for quite some time with regard to modern project management system like cmake, qmake or the others that exists.
You really should consider moving to a more modern IDE like Qt Creator, Kdevelop, or even Visual Studio Code.
It would make your task simpler in the long run.
-
I've never known Qt to work with pkg-config, nor be compatible with it, since Qt uses its own Makefile gnerator.
-
Qt has support for pkg-config both to use it to link to libraries as well as for the lib template. From the looks of it, on Debian, there are .pc files available for the various Qt modules.