PDA

View Full Version : Can not use Lua in QtCreator



piwniczne
1st November 2014, 14:08
Hi,

I try to run Lua scripts in QtCreator.
I did that to my .pro file (screen)

but it crashes when I try to run:
void MainWindowT::initLUA()
{

lua_State* pL=lua_open(); if(!pL) qFatal(“LUA cannot be initialized.”); luaL_openlibs(pL); luaL_dofile( pL,“hello.lua” );
}

at luaL_dofile( pL,“hello.lua” );.

U can see that error and pro gile at screen:
http://s2.ifotos.pl/img/1png_wpnqwrq.png

files included to project I took from Lua installed at my computer.

if I comment line with luaL_dofile it works.
IDK what to do,
Plz help me if u can.

anda_skoa
1st November 2014, 18:04
I try to run Lua scripts in QtCreator.

You are modifying QtCreator?



but it crashes when I try to run:

How can you run it if it doesn't build?

Cheers,
_

ChrisW67
1st November 2014, 21:02
The error message is because your linker cannot find the library, most probably because your PRO file does not contain a correct LIBS entry.