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. Noob at librarys
Qt 6.11 is out! See what's new in the release blog

Noob at librarys

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.9k Views 1 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.
  • B Offline
    B Offline
    brianmay27
    wrote on last edited by
    #1

    Hey guys. So please forgive the my noobness. I thought I was decent at programing until I came into contact with librarys.

    Anyway here is where im at. I want to use libxbee to communicate with a xbee via serial. It comes in a pre compiled package that all I have to do is include it. Well there is the problem. Ive tried LIBS += -L./Src/Include/libxbee_3.0.7/libs/libxbee.so.3.0.7 but I still get an error compiling saying undefined refrence to xbee_setup()... What am I doing wrong? Mind you Ive never used a downloaded library before so im still trying to understand what to do. If anyone has experence with this, I would appriciate a nudge.

    Thanks in advance

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to use both -L and -l. Here is a snippet for you:
      @
      INCLUDEPATH += path/to/lib/headers
      LIBS += -Lpath/to/lib/folder -llibraryName
      @

      Don't add stuff like .so.xx - it's added automatically by linker. "Here":https://github.com/sierdzio/qeasyshell/blob/master/examples/basic/basic.pro is a live example from one of my projects.

      (Z(:^

      1 Reply Last reply
      0
      • B Offline
        B Offline
        brianmay27
        wrote on last edited by
        #3

        Thank you! It all worked out. thanks for the simplicity.

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          I'm happy to hear that. Please add [Solved] to the beginning of this topic's subject.

          Happy coding!

          (Z(:^

          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