www.digitalmars.com         C & C++   DMDScript  

D.gnu - gdc 4.3.5 on powerpc with GtkD

reply "Steve" <steve domain.org> writes:
I've built GtkD on my Debian 6.0.7 PowerPC machine, and tried to 
compile and run some demo programs.  When I run the TestWindow 
application, I get quite a few errors like:

failed (libgio-2.0.so.0) g_dbus_error_is_remote_error
failed (libgio-2.0.so.0) g_dbus_error_get_remote_error
failed (libgio-2.0.so.0) g_dbus_error_strip_remote_error
failed (libgio-2.0.so.0) g_dbus_error_register_error_domain
failed (libgio-2.0.so.0) g_dbus_error_register_error
failed (libgio-2.0.so.0) g_dbus_error_unregister_error
failed (libgio-2.0.so.0) g_dbus_error_new_for_dbus_error

and when I compile the HelloWorld.d examplt for Gtk, I get:

/tmp/ccMuzNiD.o: In function `_Dmain':
HelloWorld.d:(.text+0x3c): undefined reference to 
`_D3gtk4Main4Main4initFAAaZv'
HelloWorld.d:(.text+0x42): undefined reference to 
`_D3gtk10MainWindow10MainWindow7__ClassZ'
HelloWorld.d:(.text+0x46): undefined reference to 
`_D3gtk10MainWindow10MainWindow7__ClassZ'
HelloWorld.d:(.text+0x70): undefined reference to 
`_D3gtk10MainWindow10MainWindow5_ctorMFAaZC3gtk10MainWindow10MainWindow'
HelloWorld.d:(.text+0xba): undefined reference to 
`_D3gtk5Label5Label7__ClassZ'
HelloWorld.d:(.text+0xbe): undefined reference to 
`_D3gtk5Label5Label7__ClassZ'
HelloWorld.d:(.text+0xec): undefined reference to 
`_D3gtk5Label5Label5_ctorMFAabZC3gtk5Label5Label'
HelloWorld.d:(.text+0x124): undefined reference to 
`_D3gtk4Main4Main3runFZv'
/tmp/ccMuzNiD.o:(.sdata+0x38): undefined reference to 
`_D3gtk10MainWindow12__ModuleInfoZ'
/tmp/ccMuzNiD.o:(.sdata+0x3c): undefined reference to 
`_D3gtk5Label12__ModuleInfoZ'
/tmp/ccMuzNiD.o:(.sdata+0x40): undefined reference to 
`_D3gtk4Main12__ModuleInfoZ'
collect2: ld returned 1 exit status

I have Gtk-2 installed (version 3 isn't available for my distro 
yet).  I'm also using GtkD 1.7.1.  My command line for the 
compile is:

me iMacA:$ gdc -I/home/me/GtkD/src /usr/local/lib/libgtkd-1.a 
/usr/local/lib/libgtkdgl-1.a /usr/local/lib/libgtkdsv-1.a -L-ldl 
HelloWorld.d

Seems like I'm missing a library or something.
Mar 20 2013
parent Mike Wey <mike-wey example.com> writes:
On 03/21/2013 05:19 AM, Steve wrote:
 I've built GtkD on my Debian 6.0.7 PowerPC machine, and tried to compile
 and run some demo programs.  When I run the TestWindow application, I
 get quite a few errors like:

 failed (libgio-2.0.so.0) g_dbus_error_is_remote_error
 failed (libgio-2.0.so.0) g_dbus_error_get_remote_error
 failed (libgio-2.0.so.0) g_dbus_error_strip_remote_error
 failed (libgio-2.0.so.0) g_dbus_error_register_error_domain
 failed (libgio-2.0.so.0) g_dbus_error_register_error
 failed (libgio-2.0.so.0) g_dbus_error_unregister_error
 failed (libgio-2.0.so.0) g_dbus_error_new_for_dbus_error
The TestWindow demo outputs a list of functions it is unable to load, usually because GtkD is based on a newer version of Gtk/Glib then what is installed. As long as your not using those functions you should be fine. Does the demo app rum properly?
 and when I compile the HelloWorld.d examplt for Gtk, I get:

 /tmp/ccMuzNiD.o: In function `_Dmain':
 HelloWorld.d:(.text+0x3c): undefined reference to
 `_D3gtk4Main4Main4initFAAaZv'
 HelloWorld.d:(.text+0x42): undefined reference to
 `_D3gtk10MainWindow10MainWindow7__ClassZ'
 HelloWorld.d:(.text+0x46): undefined reference to
 `_D3gtk10MainWindow10MainWindow7__ClassZ'
 HelloWorld.d:(.text+0x70): undefined reference to
 `_D3gtk10MainWindow10MainWindow5_ctorMFAaZC3gtk10MainWindow10MainWindow'
 HelloWorld.d:(.text+0xba): undefined reference to
 `_D3gtk5Label5Label7__ClassZ'
 HelloWorld.d:(.text+0xbe): undefined reference to
 `_D3gtk5Label5Label7__ClassZ'
 HelloWorld.d:(.text+0xec): undefined reference to
 `_D3gtk5Label5Label5_ctorMFAabZC3gtk5Label5Label'
 HelloWorld.d:(.text+0x124): undefined reference to
 `_D3gtk4Main4Main3runFZv'
 /tmp/ccMuzNiD.o:(.sdata+0x38): undefined reference to
 `_D3gtk10MainWindow12__ModuleInfoZ'
 /tmp/ccMuzNiD.o:(.sdata+0x3c): undefined reference to
 `_D3gtk5Label12__ModuleInfoZ'
 /tmp/ccMuzNiD.o:(.sdata+0x40): undefined reference to
 `_D3gtk4Main12__ModuleInfoZ'
 collect2: ld returned 1 exit status

 I have Gtk-2 installed (version 3 isn't available for my distro yet).
 I'm also using GtkD 1.7.1.  My command line for the compile is:

 me iMacA:$ gdc -I/home/me/GtkD/src /usr/local/lib/libgtkd-1.a
 /usr/local/lib/libgtkdgl-1.a /usr/local/lib/libgtkdsv-1.a -L-ldl
 HelloWorld.d

 Seems like I'm missing a library or something.
The symbols it's complaining about should be in gtkd-1.a, since the libs are in /usr/local/lib you could try: gdc HelloWorld.d -I/home/me/GtkD/src -L-lggtkd-1 -L-ldl -- Mike Wey
Mar 21 2013