lua-users home
lua-l archive

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


In my libs directory, I have a liblua.a  (which is a static library if
I understand correctly). I used the following to compile LPeg library:

gcc -Wall -Wextra -pedantic -Waggregate-return -Wbad-function-cast
-Wcast-align -Wcast-qual -Wdeclaration-after-statement
-Wdisabled-optimization -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wshadow -Wsign-compare -Wstrict-prototypes -Wundef
-Wwrite-strings  -O2 -DNDEBUG -ansi -I/opt/include   -c -o lpeg.o
lpeg.c

gcc -shared  -L/opt/lib -llua lpeg.o -o lpeg.so

I added the '-llua' part and I believe that's what is messing things
up. If I do not put this however, it doesn't compile with lots of
undefined symbols '_lua_something'. Would a liblua.so fix things? How
can I make one from Lua sources?

Thanks


-- Cédric



On Wed, Aug 4, 2010 at 13:30, Cedric Mauclair <cedric.mauclair@gmail.com> wrote:
> Hum... I guess not. I will check.
>
> -- Cédric
>
> On Wed, Aug 4, 2010 at 13:24, Romulo <romuloab@gmail.com> wrote:
>> Have you checked if you are not static linking any of the shared libs?
>>
>> On 8/4/10, Cedric Mauclair <cedric.mauclair@gmail.com> wrote:
>>> On Wed, Aug 4, 2010 at 10:50, Linker <linker.m.lin@gmail.com> wrote:
>>>> Hi Cédric,
>>>>   You can add the following line to the test.lua:
>>>> collectgarbage("stop")
>>>>   It will help you to work around the problem.
>>>
>>> Thank you. I tried that and I got 3 pluses in less than a second. I
>>> imagine that it means 3 tests succeeded. However, I get a 'Bus error'
>>> now. :-(
>>>
>>>>
>>>> --
>>>> Regards,
>>>> Linker Lin
>>>> linker.m.lin@gmail.com
>>>>
>>>
>>> -- Cédric
>>>
>>
>> --
>> Sent from my mobile device
>>
>