[Interest] Dumping compiler flags

Konrad Rosenbaum konrad at silmor.de
Wed Dec 22 17:15:36 CET 2021


Hi,

On 22/12/2021 15:19, Bob Hood wrote:
> It must have been another package I was thinking of, then.  I recall 
> being able to retrieve the exact build flags for the framework, which 
> could then be applied verbatim to the project that depended upon it to 
> ensure parity.  For some reason I thought that was Qt, but it must 
> have been before I discovered it so many years ago.

That got me going again... a lot of old autotools based packages used to 
have a config script that tells you what flags you need to use, those 
have been unified into pkgconfig a few years ago (might be a lot of 
years ago).


pkg-config --cflags $PACKAGE
   --> gives you the compiler flags you need for that package

pkg-config --libs $PACKAGE
   --> gives you the link directive for the package


pkg-config --list-all
   --> shows you all available packages


$PACKAGE would be something like Qt5Core or Qt5Gui - at least for the Qt 
5.15 installed on my Debian.

You can set the environment variable $PKG_CONFIG_PATH to direct it to 
search in additional directories before it searches its default path. 
Unfortunately the current Qt6 packages from tQC don't seem to have any 
of those. There is an open bug for this: 
https://bugreports.qt.io/browse/QTBUG-86080 .



     Konrad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20211222/12d8150d/attachment.sig>


More information about the Interest mailing list