Axel Simon <[email protected]> writes:
> On Dec 8, 2009, at 15:43, Andy Stewart wrote:
>
>> Axel Simon <[email protected]> writes:
>>
>>> Hi Andy,
>>>
>>> I suspect that you have not added the Makefile rule to create the
>>> Type.chs file. Check the other
>>> bindings such as Cairo for an example. Note that these rules have
>>> changed recently with the
>>> multi-threading fixes.
>> In Makefile.am file, it have below snippets:
>>
>> ------------------------------> snippets start
>> <------------------------------
>> ...
>> libHSdbus_a_GENERATEDSOURCES = \
>> dbus/System/DBus/Types.chs
>>
>> nodist_libHSdbus_a_SOURCES = $(libHSdbus_a_GENERATEDSOURCES)
>>
>> libHSdbus_a_SOURCES = \
>> dbus/System/DBus/GConnection.chs \
>> dbus/System/DBus/GError.chs \
>> dbus/System/DBus/GMessage.chs \
>> dbus/System/DBus/GMethod.chs \
>> dbus/System/DBus/GProxy.chs \
>> dbus/System/DBus/DBus.hs
>>
>> htmldoc_HSFILES_HIDDEN += $(libHSdbus_a_GENERATEDSOURCES:.chs=.hs)
>>
>> libHSdbus_a_LIBADD = \
>> dbus/System/DBus/DBus_stub.o
>>
>> dbus/System/DBus/Types.chs : \
>> $(srcdir)/tools/hierarchyGen/hierarchy.list \
>> $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
>> $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template
>> $(strip $(srcdir)/tools/hierarchyGen/TypeGenerator$(EXEEXT) \
>> $(srcdir)/tools/hierarchyGen/hierarchy.list \
>> $(srcdir)/tools/hierarchyGen/Hierarchy.chs.template \
>> $@ --tag=dbus --lib=dbus --prefix=dbus \
>> --modname=System.DBus.Types --import=*System.Glib.GObject)
>
> The --import=* form is new (in contrast to --import= which does a chs
> import using {# #}). Thus, it seems you're using the recent darcs
> version. So you're all set.
>
>> ...
>> ------------------------------> snippets end
>> <------------------------------
>>
>> And i have wrote
>>
>> DBusGProxy as GProxy, dbus_g_proxy_get_type if dbus
>>
>> in `gtk2hs/tools/hierarchyGen/hierarchy.list` file.
>>
>> Then gtk2hs will generate Types.chs file for type `DBusGProxy`, and
>> below is
>> `dbus/System/DBus/Types.chs` file.
>>
>> <Types.chs>
>> So code "{#import System.DBus.Types#}" in GProxy.chs.pp should
>> works fine, because
>> Types.chs file generate correctly, right?
>
> Did you do a 'make distclean'? What happens if you do a 'make dbus/
> System/DBus/Types.chs'?
I check Makefile.am again, i found a mistake.
In `libHSdbus_a_SOURCES` should wrote `dbus/System/DBus.hs` and not
`dbus/System/DBus/DBus.hs`.
Now compile pass, sorry for typo! :)
But i got another error:
------------------------------> error start <------------------------------
/usr/bin/ld -r -x -o HSdbus.o dbus/System/DBus/GConnection.o
dbus/System/DBus/GError.o dbus/System/DBus/GMessage.o
dbus/System/DBus/GMethod.o dbus/System/DBus/GProxy.o dbus/System/DBus.o
dbus/System/DBus/Types.o dbus/System/DBus_stub.o
/usr/bin/ld: dbus/System/DBus_stub.o: No such file: No such file or directory
------------------------------> error end <------------------------------
With above error, looks i don't need DBus_stub.o file.
Infact, i don't understand why need *_stub.o file, and when time need
*_stub.o file (such as `vte/Graphics/UI/Gtk/Vte/Vte_stub.o`)?
If don't use *_stub.o file, just remove
libHSdbus_a_LIBADD = \
dbus/System/DBus_stub.o
is okay?
Can you explain those for me?
Thanks!
-- Andy
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Gtk2hs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel