lua-users home
lua-l archive

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


On Wed, Sep 24, 2008 at 5:57 PM, Juan Backson <juanbackson@gmail.com> wrote:
> On Thu, Sep 25, 2008 at 8:28 AM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>>
>> > Does anyone have any idea what is wrong?
>> >
>> > > 2008-09-24 20:02:20 [ERR] mod_lua.cpp:177 lua_parse_and_execute()
>> > > error
>> > > loading module 'luasql.mysql' from file
>> > > '/usr/local/lib/lua/5.1/luasql/mysql.so':
>> > >         /usr/local/lib/lua/5.1/luasql/mysql.so: undefined symbol:
>> > > lua_getfield
>>
>> Have you compiled Lua as C or C++?
>
> Hi,
>
> No, I did not compile my lua code.  It is the application I am using that
> will take my lua scripts ad run with it.   I don't think the application
> compiles the lua code for me.
>
> Thanks,
> JB

It's not the code written in Lua that's compiled: Lua (written in C,
also valid as C++) is compiled, and that version doesn't seem to be
link-compatible with the compiled mysql.so library.  One possible
reason is that one was compiled as C and one was compiled as C++.
Without many more details of where all of these libraries have come
from and/or how they were built, and how you are linking, it's hard to
guess what's wrong.  From the ".so" filename and the paths we guess
that this is likely some Unix-like platform, but beyond that we're
speculating.

-- James