PDA

View Full Version : calling a lua script



reyalpz
6th October 2013, 18:08
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

wysota
7th October 2013, 12:12
How is that related to Qt?