[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: New to Lua, a few big surprises and still struggling to compile/run my first experiment
- From: "Avinash D'Silva" <avinash.roshan.dsilva@...>
- Date: Sat, 5 May 2018 23:40:02 +0100
Thanks I got it working using:
gcc -o lui.so -shared -framework Foundation -framework AppKit -fPIC
-Isrc src/lui.c -I ../lua-src -I ../libui -L . -lui -undefined
dynamic_lookup
source: https://github.com/zhaozg/lui/issues/1#issuecomment-386839184
On Sat, May 5, 2018 at 11:29 PM, Avinash D'Silva
<avinash.roshan.dsilva@gmail.com> wrote:
> Jeff,
>
> I did try that, but it ends up with a huge list of errors.
>
> gcc -o lui.so -shared -framework Foundation -framework AppKit
> -fPIC -Isrc src/lui.c -I ../lua-src -I ../libui -L . -lui
>
> Undefined symbols for architecture x86_64:
>
> "_luaL_argerror", referenced from:
>
> _l_uiNewAttribute in lui-9b7f22.o
>
> "_luaL_checkinteger", referenced from:
>
> _l_uiAreaSetSize in lui-9b7f22.o
>
> _l_uiAreaBeginUserWindowResize in lui-9b7f22.o
>
> _l_uiAttributedStringInsertAtUnattributed in lui-9b7f22.o
>
> _l_uiAttributedStringDelete in lui-9b7f22.o
>
> _l_uiAttributedStringSetAttribute in lui-9b7f22.o
>
> _l_uiAttributedStringByteIndexToGrapheme in lui-9b7f22.o
>
> _l_uiAttributedStringGraphemeToByteIndex in lui-9b7f22.o
>
> ... and so on....
>
>
> On Sat, May 5, 2018 at 11:23 PM, Jeff Pohlmeyer
> <yetanothergeek@gmail.com> wrote:
>> On Sat, May 5, 2018 at 5:18 PM, Avinash D'Silva
>> <avinash.roshan.dsilva@gmail.com> wrote:
>>
>>> gcc -o lui.so -shared -framework Foundation -framework AppKit
>>> -fPIC -Isrc src/lui.c -I ../lua-src -I ../libui -L . -llua -lui
>> ...
>>> lua: multiple Lua VMs detected
>>> stack traceback:
>>
>> Don't use -llua when linking lui.so (The Lua interpreter already has
>> lua linked in so the module doesn't need it.)
>>
>> - Jeff
>>
>
>
>
> --
> -
> Warm regards,
> Avinash D' Silva
>
>
>
> ☎ Mobile | +353 892210993
> ✉ Gmail | avinash.roshan.dsilva@gmail.com
--
-
Warm regards,
Avinash D' Silva
☎ Mobile | +353 892210993
✉ Gmail | avinash.roshan.dsilva@gmail.com