PDA

View Full Version : -llua not found error



MarkoSan
12th February 2011, 07:13
Hi to all!

I am trying to compile my project and while trying to do that, I get following error:
p, li { white-space: pre-wrap; } ld: library not found for -llua5
collect2: ld returned 1 exit status
make: *** [TestApp.app/Contents/MacOS/TestApp] Error 1
make: Leaving directory `/Users/x/Desktop/TestApp-build-desktop'
The process "/usr/bin/make" exited with code 2.
Error while building project TestApp (target: Desktop)
When executing build step 'Make'I want to dynamically link lua lib into my project and here is a chunk of my .pro file:
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/lua/release/ -llua5
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/lua/debug/ -llua5
else:symbian: LIBS += -llua5
else:unix: LIBS += -L$$PWD/lua/ -llua5

INCLUDEPATH += $$PWD/lua
DEPENDPATH += $$PWD/luaThe libraries are:
lua/liblua5.1.so
lua/liblua5.1.a
lua/liblua5.1.dylibShit, I solved it, the names of libs vere wrong, stupido me!!!!

Added after 28 minutes:

Well, ok, now compiles ok, but once I want to launch app, I get error:
p, li { white-sStarting /Users/xx/Desktop/ABTeamTestApp-build-desktop/TestApp.app/Contents/MacOS/TestApp...
dyld: Library not loaded: liblua5.1.dylib
Referenced from: /Users/xx/Desktop/TestApp-build-desktop/TestApp.app/Contents/MacOS/TestApp
Reason: image not found
The program has unexpectedly finished.

wysota
14th February 2011, 00:36
Your system's dynamic linker can't find the library. You need to put it in some place where it can find it or point the linker to the directory containing the library (an equivalent of linux's LD_LIBRARY_PATH).