Results 1 to 2 of 2

Thread: calling a lua script

  1. #1

    Default calling a lua script

    I am trying to run a lua script from a plain c project but I can't even compile it.
    I am using win 7, qt 4.8.5

    I downloaded lua 5.1 and put all the source files (.header, .c ) in the project. -> add existing files.And copied the src folder in the project folder.
    So , main.c looks like this

    #include <stdio.h>
    extern "C"
    {
    #include "src/lua.h"
    #include "src/lualib.h"
    #include "src/lauxlib.h"
    }
    int main(void)
    {
    printf("Hello World!\n");
    return 0;
    }


    And I get these errors.
    error: expected identifier or '(' before string constant
    error: [debug/main.o] Error 1

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: calling a lua script

    How is that related to Qt?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 4
    Last Post: 1st February 2013, 11:16
  2. Qt Script
    By c_srikanth1984 in forum Qt Programming
    Replies: 3
    Last Post: 9th June 2009, 10:35
  3. Calling QPrintDialog from script
    By rikardo in forum Qt Programming
    Replies: 0
    Last Post: 1st June 2009, 09:19
  4. Can I include a script from script?
    By yycking in forum Qt Programming
    Replies: 1
    Last Post: 24th April 2009, 03:01
  5. Qt script
    By rajesh_clt3 in forum Qt Programming
    Replies: 2
    Last Post: 27th July 2007, 12:40

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.