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
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 ../
[EDIT: code formatting, please wrap in @-tags, Volker]
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.
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]
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.
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?
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.