lua-users home
lua-l archive

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


On Sun, Nov 18, 2012 at 11:08 PM, Daurnimator <quae@daurnimator.com> wrote:
> On 19 November 2012 14:59, Rena <hyperhacker@gmail.com> wrote:
>>
>> I've run into an issue when porting a program from LuaGnome to lgi.
>> This program loads another C library which uses some GDK functions.
>> Since it's a shared library I guess it expects the host program to
>> load the appropriate GDK libraries as well, and LuaGnome would do
>> this, but lgi does not? So the library can't be loaded:
>>
>> lua5.1: error loading module 'display' from file './display/build/display.so':
>>         ./display/build/display.so: undefined symbol: gdk_draw_rgb_image
>>
>> I feel like I fixed this problem once before, by referencing some GDK
>> function in the Lua script before loading the library that depends on
>> it, so that the GDK libraries would be loaded. But I can't find the
>> program that did that now (maybe I dreamed it?), and the result is
>> even stranger than I expected - lgi.Gdk.draw_rgb_image is nil. As is
>> lgi.Gdk.pixbuf_new, on the off chance that one function had been
>> changed. So I'm not sure how you're meant to even use GDK with lgi,
>> let alone load the library so that others can use it?
>>
>> --
>> Sent from my Game Boy.
>>
>
> Are you loading the gdk library?
> That is, try `local Gdk = lgi.require('Gdk', '3.0')` (from
> https://github.com/pavouk/lgi/blob/master/samples/console.lua#L8 )
>

That just returns the same table that lgi.Gdk already refers to.

-- 
Sent from my Game Boy.