Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Taglib In Qt

Taglib In Qt

Scheduled Pinned Locked Moved Solved General and Desktop
taglibmusic
12 Posts 3 Posters 6.9k 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.
  • S Offline
    S Offline
    shahriar25
    wrote on last edited by shahriar25
    #1

    Hi. I need help. I'm working on a musicplayer and I wanted to use Taglib in my app so I downloaded taglib-1.10 but I have no idea what to do with it or add which file to my app. Should I make the folder with cmake and then add some files in it to my app?
    What should I do?
    Any help would be appreciated

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      well if u already have the actual library,
      then often the step involved to use it ,
      is to explain compiler there to get the library and then also some
      .h file to know what functions is available.
      so to know how to use the .a file
      so normally
      it is adding
      LIBS += -L[path to lib] -l[name of lib]
      to the .pro file.

      If you do not have the actual library yet, you might need to build it.

      Are you on windows or linux`?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        shahriar25
        wrote on last edited by
        #3

        I'm on linux fedora. I downloaded the file in
        https://github.com/taglib/taglib
        Do I need to build it with cmake?
        And I will only need to add the .a file to my app?

        mrjjM 1 Reply Last reply
        0
        • S shahriar25

          I'm on linux fedora. I downloaded the file in
          https://github.com/taglib/taglib
          Do I need to build it with cmake?
          And I will only need to add the .a file to my app?

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Ok super.
          Yes, I think you need to build it. seems to be only source.
          It should build the .a file.

          You then open your .pro file, right click ( just in middle of file)
          and choose "Add library"
          Then browse to the .a file.

          You then also need some .h file added to the project from the tablib folder.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            shahriar25
            wrote on last edited by
            #5

            I built the folder with cmake but there is no .a file.
            I built it this way in terminal

            cd /toTheTaglibFolder
            cmake taglib-1.10(the folder)

            What am I doing wrong?
            And which .h files I need to add to my project?

            And also thank you for answering :)

            mrjjM 1 Reply Last reply
            0
            • S shahriar25

              I built the folder with cmake but there is no .a file.
              I built it this way in terminal

              cd /toTheTaglibFolder
              cmake taglib-1.10(the folder)

              What am I doing wrong?
              And which .h files I need to add to my project?

              And also thank you for answering :)

              mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @shahriar25
              hi what happened what u typed
              cmake taglib-1.10(the folder)

              else try
              cd taglib-1.1
              ./configure
              make

              1 Reply Last reply
              0
              • S Offline
                S Offline
                shahriar25
                wrote on last edited by
                #7

                Hi. I did what you said but look what happened:

                [shahriar@localhost ~]$ cd Desktop/
                [shahriar@localhost Desktop]$ cd taglib-1.10/
                [shahriar@localhost taglib-1.10]$ ./configure
                bash: ./configure: No such file or directory
                [shahriar@localhost taglib-1.10]$

                if this is not working is there another way to get and edit tags in my app beside QMediaPlayer.metaData(); (because it truly terrible) or should I only focus on taglib?

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Hi,

                  If you are running on Linux, your distribution is likely to provide that library. Check that with the package manager and install the developer package for that library. That should simplify things.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    shahriar25
                    wrote on last edited by
                    #9

                    Hi
                    After trying a while I got a libtag.so file and about 104 header files.
                    I want the users to be able to use this app so what are the right headers to add into my project(music player) ?
                    and won't the .h files need .cpp files?

                    mrjjM 1 Reply Last reply
                    0
                    • S shahriar25

                      Hi
                      After trying a while I got a libtag.so file and about 104 header files.
                      I want the users to be able to use this app so what are the right headers to add into my project(music player) ?
                      and won't the .h files need .cpp files?

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @shahriar25
                      Good work
                      That is a shared library
                      You can read about using them here
                      https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
                      In short, use "Add library" function as i mention in post before.

                      Then look at the .H files. is there a taglib.h ?
                      that would be a good guess.

                      The cpp are in the SO file so to say.
                      So u use the H files to know what the SO offers and the SO provides
                      what the H file declares.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        shahriar25
                        wrote on last edited by
                        #11

                        Hi.
                        I finally did it.
                        Thank you so much @mrjj & @SGaist. Both of you helped so much

                        mrjjM 1 Reply Last reply
                        1
                        • S shahriar25

                          Hi.
                          I finally did it.
                          Thank you so much @mrjj & @SGaist. Both of you helped so much

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @shahriar25
                          Congrationations :)
                          Good work!

                          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