MarkoSan
10th February 2011, 14:40
Hi to all!
I am trying to compile qt 4.7.0 app that integrades LUA scripting language in Qt Creator 2.0.1 under Windows 7 Ultimate. At compile time, I get following errors:
debug/mainwindow.o:C:\Users\HP2\Desktop\ABTeamTestApp-build-desktop/../ABTeamTestAppWC/mainwindow.cpp:32: undefined reference to `luaL_newstate' debug/mainwindow.o:C:\Users\HP2\Desktop\ABTeamTestApp-build-desktop/../ABTeamTestAppWC/mainwindow.cpp:35: undefined reference to `luaL_openlibs'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\ABTeamTestApp.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project ABTeamTestApp (target: Desktop)
When executing build step 'Make'
When executing build step 'Make'.Now, the reason for error is following method:
void MainWindow::initLUA()
{
lua_State* L=lua_open();
if(!L)
qFatal("LUA cannot be initialized.");
luaL_openlibs(L);
}I am checking my .pro file (for including dlls and libs)
and I am getting nowhere. Here is .pro file:
#-------------------------------------------------
#
# Project created by QtCreator 2011-02-10T10:21:14
#
#-------------------------------------------------
QT += core gui
TARGET = ABTeamTestApp
TEMPLATE = app
CONFIG += ordered
SOURCES += main.cpp\
mainwindow.cpp \
centralwidget.cpp \
HEADERS += mainwindow.h \
centralwidget.h \
lua/include/lualib.h \
lua/include/luaconf.h \
lua/include/lua.hpp \
lua/include/lua.h \
lua/include/lauxlib.h
win32:LIBS += \
-L"lua/lib/lua5.1.lib" \
-L"lua/lib/lua51.lib" \
-L"lua/lib/lua5.1.dll" \
-L"lua/lib/lua51.dll"Can someone help me with problem?
Sincerely,
Marko
I am trying to compile qt 4.7.0 app that integrades LUA scripting language in Qt Creator 2.0.1 under Windows 7 Ultimate. At compile time, I get following errors:
debug/mainwindow.o:C:\Users\HP2\Desktop\ABTeamTestApp-build-desktop/../ABTeamTestAppWC/mainwindow.cpp:32: undefined reference to `luaL_newstate' debug/mainwindow.o:C:\Users\HP2\Desktop\ABTeamTestApp-build-desktop/../ABTeamTestAppWC/mainwindow.cpp:35: undefined reference to `luaL_openlibs'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\ABTeamTestApp.exe] Error 1
mingw32-make: *** [debug] Error 2
The process "C:/Qt/2010.05/mingw/bin/mingw32-make.exe" exited with code %2.
Error while building project ABTeamTestApp (target: Desktop)
When executing build step 'Make'
When executing build step 'Make'.Now, the reason for error is following method:
void MainWindow::initLUA()
{
lua_State* L=lua_open();
if(!L)
qFatal("LUA cannot be initialized.");
luaL_openlibs(L);
}I am checking my .pro file (for including dlls and libs)
and I am getting nowhere. Here is .pro file:
#-------------------------------------------------
#
# Project created by QtCreator 2011-02-10T10:21:14
#
#-------------------------------------------------
QT += core gui
TARGET = ABTeamTestApp
TEMPLATE = app
CONFIG += ordered
SOURCES += main.cpp\
mainwindow.cpp \
centralwidget.cpp \
HEADERS += mainwindow.h \
centralwidget.h \
lua/include/lualib.h \
lua/include/luaconf.h \
lua/include/lua.hpp \
lua/include/lua.h \
lua/include/lauxlib.h
win32:LIBS += \
-L"lua/lib/lua5.1.lib" \
-L"lua/lib/lua51.lib" \
-L"lua/lib/lua5.1.dll" \
-L"lua/lib/lua51.dll"Can someone help me with problem?
Sincerely,
Marko