[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Ubuntu, C and LUA
- From: Justin Cormack <justin@...>
- Date: Thu, 16 Jun 2011 12:38:56 +0100
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