Problem using the tag.lib
Scott Wheeler
scott at taglib.org
Sun Sep 24 13:46:06 BST 2023
On 23. Sep 2023, at 20:55, Pedro Mitidieri <mitidieripedro at gmail.com> wrote:
>
> Hello,
>
> I have a problem while trying to link taglib to my simple project, which is done in windows with Qt 5.15 and C++.
>
> I have followed the steps of the installation guide. As a result, I have 3 folders named bin, include and lib and I have copied them into the folder of my project inside a folder called taglib. So the path to the include folder would be:
> $root_folder_of_project$/taglib/include .
>
> Once I have them there, I have modified the CMakeList.txt to try to use it in my project. To accomplish this, I have added the following lines:
> add_subdirectory("./taglib")
> target_link_libraries(AudioDatabaseManager PRIVATE "absolute_path_to_root_folder\\taglib\\lib")
>
> The line: target_link_libraries(...) I have added just after the target_link_libraries() used for connecting the other Qt libraries.
>
> After these steps, QT Creator 10.0.2 is able to autocomplete the path to the files and autocomplete the classes and their methods. So, I am assuming that it has worked. However, when I try to build, it fails. The error that I am encountering is :
> <image.png>
You’re not linking to TagLib at all, you’re just including the headers. The easiest way to do that on Linux would be by using pkg-config from CMake. There’s info on that here:
https://stackoverflow.com/questions/29191855/what-is-the-proper-way-to-use-pkg-config-from-cmake
Just swap SDL for TagLib there.
-Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/taglib-devel/attachments/20230924/5cfd0fd4/attachment.htm>
More information about the taglib-devel
mailing list