lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, 2011-06-16 at 14:09 +0300, MikkoMMM wrote:
> I am using Ubuntu but I've been having problems first compiling my C
> project that uses LUA and then I found a way that it compiles but
> crashes when run. It compiled and worked fine on Fedora and Windows 7
> using MinGW with all of these tries.
> 
> I use this Makefile. If it doesn't have both -llua5.1 and -llua it
> usually generates even more errors.
> CC = gcc
> CFLAGS = -Wall -g -O0 -lSDL -lSDL_image -lSDL_ttf -llua5.1 -llua
> tom: src/tom.c
> 	$(CC) src/tom.c $(CFLAGS) $(FLAGS) -o tom
> 
> Using this code:
> 
> 	lua_State* L;
> 	L = luaL_newstate();
> 	luaL_openlibs(L);


It works fine for me if I add -I/usr/include/lua5.1 to the CFLAGS in the
Makefile (Ubuntu natty).

Justin