Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to Build TagLib (https://taglib.org) to . a file? I want to use it to add to my QML project.
Forum Update on Monday, May 27th 2025

How to Build TagLib (https://taglib.org) to . a file? I want to use it to add to my QML project.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 3 Posters 479 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Minh Quoc
    wrote on last edited by
    #1

    I use MacOs.
    I want to build TagLib to .a file and then add to to my QML project and I get stuff.

    1 Reply Last reply
    0
    • semlanikS Offline
      semlanikS Offline
      semlanik
      wrote on last edited by
      #2

      Seems this option is not available anymore:
      taglib-1.11.1/CMakeLists.txt:11

      But if you will change:
      taglib-1.11.1/taglib/CMakeLists.txt:345
      to

      add_library(tag STATIC ${tag_LIB_SRCS} ${tag_HDRS})
      

      It might work for you. But keep in mind that you also need to take care about taglib dependencies

      1 Reply Last reply
      1
      • K Offline
        K Offline
        Kobid
        wrote on last edited by
        #3

        Don't have MacOs but successfully using quite recent taglib version on Linux in my Qt Quick Controls 2 app. Here is my .pro file (notice libz and libdl requirement). Maybe you can adjust it to MacOS. In my project dir I have subdir "taglib" with all headers and subdir "libs" (also in project dir) with libtag.a

        HEADERS += \
            taglib/audioproperties.h \
            taglib/fileref.h \
            taglib/tag.h \
            taglib/taglib_config.h \
            taglib/taglib_export.h \
            taglib/taglib.h \
            taglib/tbytevector.h \
            taglib/tbytevectorlist.h \
            taglib/tbytevectorstream.h \
            taglib/tdebug.h \
            taglib/tfile.h \
            taglib/tfilestream.h \
            taglib/tiostream.h \
            taglib/tlist.h \
            taglib/tmap.h \
            taglib/tpropertymap.h \
            taglib/toolkit/tstring.h \
            taglib/toolkit/tstringlist.h \
            taglib/unicode.h 
        
        unix|win32: LIBS += -L$$PWD/libs/ -ltag
        LIBS += -lz
        LIBS += -ldl
        
        INCLUDEPATH += taglib
        INCLUDEPATH += taglib/toolkit
        INCLUDEPATH += $$PWD/taglib
        DEPENDPATH += $$PWD/taglib
        
        win32:!win32-g++: PRE_TARGETDEPS += $$PWD/libs/tag.lib
        else:unix|win32-g++: PRE_TARGETDEPS += $$PWD/libs/libtag.a
        
        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved