FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GtkD Problems
Goto page Previous  1, 2
 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
ShprotX



Joined: 28 Aug 2007
Posts: 24
Location: Ukraine

PostPosted: Sat Nov 17, 2007 7:22 am    Post subject: Reply with quote

darthsight wrote:
It returns nothing.
How can I install it?

After compiling gtkD nothing is installed so you have to copy libgtk.a and headers manually. libgtkd.a to /usr/lib/ or /usr/local/lib/; headers to /usr/include/d/(compiler_version)/ or /usr/local/include/d/(compiler_version)/ (in fact, no headers are generated that's why I used source codes instead).
Back to top
View user's profile Send private message
darthsight



Joined: 13 Nov 2007
Posts: 16

PostPosted: Sat Nov 17, 2007 12:30 pm    Post subject: Reply with quote

I copied libgtkd.a to urs/lib, then I tried to compile helloworld but it returns this:

Code:

pk-linux:~/prgd/gtkD/src$ gcc helloworld.o -o helloworld -m32 -ldl -lgtkd -lphobos -lpthread -lm
/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/libgtkd.a(Pixbuf.o):(.data+0x8c): undefined reference to `_D9gdkpixbuf12PixbufFormat12__ModuleInfoZ'
collect2: ld returned 1 exit status


Probably becuse I didn't copy headers, but I didn't understand what headers are... :-\
Back to top
View user's profile Send private message
darthsight



Joined: 13 Nov 2007
Posts: 16

PostPosted: Mon Nov 19, 2007 1:22 pm    Post subject: Reply with quote

What headers are?
Back to top
View user's profile Send private message
okibi



Joined: 04 Jan 2007
Posts: 170

PostPosted: Wed Dec 05, 2007 7:42 am    Post subject: Reply with quote

Sorry, forgot about this post (didn't see it as having new posts).

Anyways, you just need to put libgtkd.a in a location that your libraries are located, such as /usr/lib or /usr/local/lib or where your DFLAGS are looking in your dmd.conf.
Back to top
View user's profile Send private message
siegerstein



Joined: 17 Jan 2008
Posts: 8

PostPosted: Thu Jan 24, 2008 6:56 pm    Post subject: undefined reference to `_D9gdkpixbuf12PixbufFormat12__Module Reply with quote

Also have problem to link simple hello world program:

Code:
import gtk.MainWindow;
import gtk.Label;
import gtk.GtkD;

void main(char[][] args)
{
   GtkD.init(args);
   MainWindow win = new MainWindow("Hello World");
   win.setDefaultSize(200, 100);
   win.add(new Label("Hello World"));
   win.showAll();

   GtkD.main();
}


Quote:
$ dmd hello.d -I/usr/include/d -L-ldl -L-lgtkd -L-lphobos -L-lpthread -L-lm
gcc hello.o -o hello -m32 -Xlinker /opt/dmd/lib/libphobos.a -ldl -lgtkd -lphobos -lpthread -lm -Xlinker -L/opt/dmd/bin/../lib -lphobos -lpthread -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libgtkd.a(Pixbuf.o):(.data+0x84): undefined reference to `_D9gdkpixbuf12PixbufFormat12__ModuleInfoZ'
collect2: ld returned 1 exit status

--- errorlevel 1


OS: GNU/Linux x86
Digital Mars D Compiler v1.020
gcc (GCC) 4.1.2 20070214 ( (gdc 0.24, using dmd 1.020)) (Gentoo 4.1.2 p1.0.2)

I have familiar problem here

but running gdc_undefsymbol_workaround.sh script resolved problem.
Now I also try this script, but it don't help me.

Any ideas?
Back to top
View user's profile Send private message
Erihel



Joined: 19 Jun 2007
Posts: 3

PostPosted: Thu Jan 24, 2008 8:06 pm    Post subject: Reply with quote

I don't know what gtkD version you use but there's lib for pixbuf which you have to link (in my case it's libDG-gdkpixbuf.a).
Back to top
View user's profile Send private message
siegerstein



Joined: 17 Jan 2008
Posts: 8

PostPosted: Fri Jan 25, 2008 8:47 am    Post subject: undefined reference to `__gdc_personality_v0' Reply with quote

Quote:
I don't know what gtkD version you use

from SVN

Quote:
but there's lib for pixbuf which you have to link (in my case it's libDG-gdkpixbuf.a)

Yes, it also require libDG-gtkc.a

Quote:
$ dmd hello.d -I/usr/include/d -L-lgtkd -L-ldl -L-lDG-atk -L-lDG-gdkpixbuf -L-lDG-gtkc -L-lm
gcc hello.o -o hello -m32 -Xlinker /opt/dmd/lib/libphobos.a -lgtkd -ldl -lDG-atk -lDG-gdkpixbuf -lDG-gtkc -lm -Xlinker -L/opt/dmd/bin/../lib -lphobos -lpthread -lm
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libDG-gdkpixbuf.a(gdkpixbuf.PixbufFormat.o):(.eh_frame+0x11): undefined reference to `__gdc_personality_v0'
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../libDG-gtkc.a(gtkc.gdkpixbuf.o):(.eh_frame+0x11): undefined reference to `__gdc_personality_v0'
collect2: ld returned 1 exit status

--- errorlevel 1


but I again have error.
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Fri Jan 25, 2008 3:06 pm    Post subject: Re: undefined reference to `_D9gdkpixbuf12PixbufFormat12__Mo Reply with quote

siegerstein wrote:
I have familiar problem here


It looks like it's the exact same error.

Quote:
but running gdc_undefsymbol_workaround.sh script resolved problem.
Now I also try this script, but it don't help me.

Any ideas?


Make sure the lib you are linking is compiled with the workaround.

Quote:
Yes, it also require libDG-gtkc.a


If you build GtkD with dsss it's probably easier to build your app with dsss:

Code:
dsss build hello.d
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group