Unfortunately,? you didn't send any information about how you compile it. It requires some experience. There are only basic steps for compiling it in the Readme. It is assumed that you are compiling it on a common distro.From your description, I guess that you have Hamlib 4.6, which you have compiled somewhere from the repository, so pkg-config does not set your Hamlib version correctly.In this case, it will have to use the compilation parameters HAMLIBVERSION_xxxx to define the Hamlib version and?HAMLIBINCLUDEPATH, HAMLIBLIBPATH (see README for more detail about qmake parameters).
if it is not absolutely necessary to use source codes, I recommend using one of the prepared installation packages. To be honest, I also recommend using QT 6.6 and higher. Unfortunately,? it is missing in many distributions