Results 1 to 3 of 3

Thread: Can not use Lua in QtCreator

  1. #1
    Join Date
    Nov 2014
    Posts
    1
    Platforms
    Windows

    Default Can not use Lua in QtCreator

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Can not use Lua in QtCreator

    Quote Originally Posted by piwniczne View Post
    I try to run Lua scripts in QtCreator.
    You are modifying QtCreator?

    Quote Originally Posted by piwniczne View Post
    but it crashes when I try to run:
    How can you run it if it doesn't build?

    Cheers,
    _

  3. #3
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Can not use Lua in QtCreator

    The error message is because your linker cannot find the library, most probably because your PRO file does not contain a correct LIBS entry.

Similar Threads

  1. QGL in QTcreator 2.5.2
    By fiodis in forum Newbie
    Replies: 1
    Last Post: 2nd November 2012, 00:41
  2. QtCreator and RPM
    By bob2oneil in forum Qt Tools
    Replies: 2
    Last Post: 20th December 2011, 14:52
  3. QtCreator 2.0 crashes application working in QtCreator 1.3
    By been_1990 in forum Qt Programming
    Replies: 2
    Last Post: 21st September 2010, 12:58
  4. Replies: 1
    Last Post: 10th February 2010, 07:28
  5. AsM in QTCreator
    By XavierQT in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2009, 02:09

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.