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. Adding "blueZ" library - linker options where ?
Qt 6.11 is out! See what's new in the release blog

Adding "blueZ" library - linker options where ?

Scheduled Pinned Locked Moved Solved General and Desktop
15 Posts 5 Posters 2.9k Views 3 Watching
  • 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.
  • Christian EhrlicherC Christian Ehrlicher

    @AnneRanch said in Adding "blueZ" library - linker options where ?:

    now I need to add path

    And what hinders you to add it?

    A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #6

    @Christian-Ehrlicher said in Adding "blueZ" library - linker options where ?:

    @AnneRanch said in Adding "blueZ" library - linker options where ?:

    now I need to add path

    And what hinders you to add it?

    I cannot "search for "bluetooth" file using "find . -name "bluetooth" I am getting folders , not a file.

    mrjjM 1 Reply Last reply
    0
    • A Anonymous_Banned275

      @Christian-Ehrlicher said in Adding "blueZ" library - linker options where ?:

      @AnneRanch said in Adding "blueZ" library - linker options where ?:

      now I need to add path

      And what hinders you to add it?

      I cannot "search for "bluetooth" file using "find . -name "bluetooth" I am getting folders , not a file.

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

      @AnneRanch
      Hi
      The syntax is like
      LIBS += -L/usr/local/lib -lmath
      so with big -L we can give the path and with little -l we give the library name.

      I assume that is what you mean by adding path ?

      A 1 Reply Last reply
      0
      • mrjjM mrjj

        @AnneRanch
        Hi
        The syntax is like
        LIBS += -L/usr/local/lib -lmath
        so with big -L we can give the path and with little -l we give the library name.

        I assume that is what you mean by adding path ?

        A Offline
        A Offline
        Anonymous_Banned275
        wrote on last edited by
        #8

        @mrjj Yes, but the -L path is wrong

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Anonymous_Banned275
          wrote on last edited by
          #9

          "I am sooo confused..."
          Should
          sudo apt-get install libbluetooth-dev
          install , by default, into

          /usr/include/bluetooth ??

          How do I get "bluetooth" out of

          libbluetooth-dev ?

          doesn't GCC works with "static" or "shared" library as oppose of Windows "DLL" ?

          And how does .pro

          QT bluetooth

          fits into scheme of things?

          jsulmJ 1 Reply Last reply
          0
          • A Anonymous_Banned275

            "I am sooo confused..."
            Should
            sudo apt-get install libbluetooth-dev
            install , by default, into

            /usr/include/bluetooth ??

            How do I get "bluetooth" out of

            libbluetooth-dev ?

            doesn't GCC works with "static" or "shared" library as oppose of Windows "DLL" ?

            And how does .pro

            QT bluetooth

            fits into scheme of things?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #10

            @AnneRanch said in Adding "blueZ" library - linker options where ?:

            libbluetooth-dev

            This installs the include files, not the lib itself, so it has no relation to -L.
            You need libbluetooth to get the lib and in that package you can see where the lib is installed.
            Using the packages of your distribution there is no need to use -L as the lib will be installed in standard libs location.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            A 1 Reply Last reply
            2
            • jsulmJ jsulm

              @AnneRanch said in Adding "blueZ" library - linker options where ?:

              libbluetooth-dev

              This installs the include files, not the lib itself, so it has no relation to -L.
              You need libbluetooth to get the lib and in that package you can see where the lib is installed.
              Using the packages of your distribution there is no need to use -L as the lib will be installed in standard libs location.

              A Offline
              A Offline
              Anonymous_Banned275
              wrote on last edited by
              #11

              @jsulm
              Sorry , but my problem is in OS itself - it refuses to install libbluetooth-dev for so far unknown reason.

              Please put this thread on hold until I fix that.

              BTW one can install library using menu in .pro file, of course one has to know from where and what. Duh.
              Then the -L/-l options are handled by QtCreator itself.

              9eee13b3-7332-4192-aba9-8265fa53b974-image.png

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

                Since you installed that library through the package manager, the paths shall already be good and you just have to link to the appropriate library.

                Since you are on Linux you can also take advantage of pkg-config and use:

                CONFIG += link_pkgconfig
                PKGCONFIG += bluez
                

                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
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #13

                  @AnneRanch said in Adding "blueZ" library - linker options where ?:

                  Sorry , but my problem is in OS itself - it refuses to install libbluetooth-dev for so far unknown reason.

                  What exact error do you get ?

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

                  A 1 Reply Last reply
                  0
                  • SGaistS SGaist

                    @AnneRanch said in Adding "blueZ" library - linker options where ?:

                    Sorry , but my problem is in OS itself - it refuses to install libbluetooth-dev for so far unknown reason.

                    What exact error do you get ?

                    A Offline
                    A Offline
                    Anonymous_Banned275
                    wrote on last edited by
                    #14

                    @SGaist I am not sure I want to discuss it here in public. Is is rather complex , but if you re interested - is there away I can send it to you private or do you want the link to the "Linux" forum? That wold save me time.
                    Basically some issue with "grub" unable to "update / upgrade" and consequently "install" also fails. Pretty messy.

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

                      If you have a grub issue then you have a system issue that is unrelated to Qt nor programming so there's indeed something messed up with your computer.

                      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
                      2

                      • Login

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