[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Embedding lua - first steps
- From: Ervin Hegedüs <airween@...>
- Date: Thu, 10 Sep 2015 12:43:46 +0200
Hi Philipp,
On Thu, Sep 10, 2015 at 11:14:40AM +0200, Philipp Janda wrote:
> Am 10.09.2015 um 10:39 schröbte Ervin Hegedüs:
[...]
> >luaload.c:(.text+0x1c): undefined reference to `luaL_newstate'
> >luaload.c:(.text+0x33): undefined reference to `luaL_openlibs'
> >luaload.c:(.text+0x44): undefined reference to `luaL_loadfile'
> >...
> >
> >I've tried them with lua5.2, lua5.1, and now the current version is lua5.0.
> >The gcc command is exactly:
> >
> >gcc -o luainit -Wall `lua-config --include --libs` luainit.c
> >
> >but I've tried it with this too:
> >
> >gcc -o luainit -Wall `lua-config --include --libs` -lm -ldl luainit.c
> >
> >The output of "lua-config -include --libs" is this:
> >
> >-I/usr/include/lua50 -L/usr/include -llualib50 -llua50
> >
> >What em I missing?
> >
>
> Try moving the source file in front of the libraries like so:
>
> gcc -o luainit -Wall luainit.c `lua-config --include --libs` -lm -ldl
thanks for your tip, that solves my problem.
regards,
a.