mingw-cross-env-list
[Top][All Lists]
Advanced

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

Re: [Mingw-cross-env-list] Re: lua problem


From: Tony Theodore
Subject: Re: [Mingw-cross-env-list] Re: lua problem
Date: Mon, 6 Dec 2010 01:27:19 +1100

On 3 November 2010 04:48, super pollo <address@hidden> wrote:
> 2010/11/2 super pollo <address@hidden>:
>> i am trying to compile and run the example at:
>>
>> http://heavycoder.com/tutorials/lua_embed.php
>>
>> following the instruction, but i get:
>>
>> temp.c: In function 'main':
>> temp.c:22:14: error: invalid storage class for function 'openlualibs'
>>
>> then, if i eliminate the static keyword from the source, i get:
>>
>> /home/2009/massimo2/mingw/mingw-cross-env-2.15/usr/lib/gcc/i686-pc-mingw32/4.5.0/../../../../i686-pc-mingw32/bin/ld:
>> cannot find -llualib
>> collect2: ld returned 1 exit status
>>
>> any suggestion?
>
> it looks like i am always wandering in the dark here, and maybe asking
> tedious questions ... is there some extensive mingw-cross-env tutorial
> for things like: "is there some pkg-config magic for using package
> foo? i see that package bar has one, package baz uses his own (like
> gd), but foo?"

There isn't a tutorial as such, but it may not have helped in this
case. The example seems to be based on a previous version of Lua, the
-llualib no longer exists, likewise for lua_dofile(). There's also a
question of style with the "static" keyword and ordering of
definitions (the first error).

To avoid this sort of trouble, I'd suggest trying it on your Unix
system first. Then when you have something working, attempt to
cross-compile.

Searching is also unhelpful in this particular case, I couldn't find
an updated embedding tutorial. You best bet would be to read the
source of some projects you know embed Lua - or even the lua.c file in
the the tarball that creates the standalone lua interpreter (since
this is in effect lua embedded in a console program).

HTH,

Tony



reply via email to

[Prev in Thread] Current Thread [Next in Thread]