Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Lib location

Lib location

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 3 Posters 3.1k 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.
  • M Offline
    M Offline
    mike4
    wrote on last edited by
    #1

    Hi
    I'm confused as I've some libs in ../bla and some in /usr/bla.
    Now how to include those in the *.pro:

    @
    TEMPLATE = lib
    QT -= gui core

    CONFIG += warn_on plugin release
    CONFIG -= thread exceptions qt rtti debug

    VERSION = 1.0.0

    INCLUDEPATH += ../SDK/CHeaders/XPLM
    INCLUDEPATH += ../SDK/CHeaders/Wrappers
    INCLUDEPATH += ../SDK/CHeaders/Widgets
    INCLUDEPATH += ../third_party_source/bullet-2.77/src

    unix:!macx {
    DEFINES += APL=0 IBM=0 LIN=1
    LIBS += -llua -lBulletDynamics -lBulletCollision -lLinearMath -lcurl -lopenal -lalut
    TARGET = lin.xpl
    # WARNING! This requires the latest version of the X-SDK !!!!
    QMAKE_CXXFLAGS += -fvisibility=hidden
    }
    @

    now it says:
    /usr/bin/ld: cannot find -llua
    I want to use lua in /usr/.... and what about if i'd want to use lua from ../
    Thanks
    Michael

    [EDIT: code formatting, please wrap in @-tags, Volker]

    1 Reply Last reply
    0
    • L Offline
      L Offline
      ludde
      wrote on last edited by
      #2

      To specify library directories, use e.g. @LIBS += -L/usr/bla@
      Sometimes you may have problems if libs you wan't to include from one place also exist in a place that is included in the library path by default, but otherwise using -L with LIBS should do the trick.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mike4
        wrote on last edited by
        #3

        @
        LIBS += -L /usr/lib/liblua5.1.a
        LIBS += -lliblua5.1 -lBulletDynamics -lBulletCollision -lLinearMath -lcurl -lopenal -lalut
        @

        still the same. Do i need -L on Linux? I thought not if it's in standard location /usr/lib/

        [EDIT: code formatting, Volker]

        1 Reply Last reply
        0
        • L Offline
          L Offline
          ludde
          wrote on last edited by
          #4

          I would not expect you to need -L for libs in places like /usr/lib, but if the lib is in there and doesn't get included, I would give it a try. You have to do it right, though... -l is for the libs, -L is for directories. You should do LIBS += -L/usr/lib, not LIBS += -L /usr/lib/liblua5.1.a.
          Also, you might want to try -llua5.1 instead of just -llua.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mike4
            wrote on last edited by
            #5

            Thanks -llua5.1 works but now i get weird errors alike:
            :-1: Error:/usr/lib/debug/usr/lib/crt1.o(.debug_info): relocation 0 has invalid symbol index 12
            so i believe the author used luajit. I've right clicked and added luajit-5 but still i get: :-1: Error:cannot find -llibluajit-5
            and ideas/help for luajit?

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on last edited by
              #6

              Can you show us your current .pro file, plase.
              Please wrap it into a @ at the beginning and one at the end, this way the code is formatted nicely.

              http://www.catb.org/~esr/faqs/smart-questions.html

              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