View previous topic :: View next topic |
Author |
Message |
ShprotX
Joined: 28 Aug 2007 Posts: 24 Location: Ukraine
|
Posted: Sat Nov 17, 2007 7:22 am Post subject: |
|
|
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 |
|
|
darthsight
Joined: 13 Nov 2007 Posts: 16
|
Posted: Sat Nov 17, 2007 12:30 pm Post subject: |
|
|
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 |
|
|
darthsight
Joined: 13 Nov 2007 Posts: 16
|
Posted: Mon Nov 19, 2007 1:22 pm Post subject: |
|
|
What headers are? |
|
Back to top |
|
|
okibi
Joined: 04 Jan 2007 Posts: 170
|
Posted: Wed Dec 05, 2007 7:42 am Post subject: |
|
|
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 |
|
|
siegerstein
Joined: 17 Jan 2008 Posts: 8
|
Posted: Thu Jan 24, 2008 6:56 pm Post subject: undefined reference to `_D9gdkpixbuf12PixbufFormat12__Module |
|
|
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 |
|
|
Erihel
Joined: 19 Jun 2007 Posts: 3
|
Posted: Thu Jan 24, 2008 8:06 pm Post subject: |
|
|
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 |
|
|
siegerstein
Joined: 17 Jan 2008 Posts: 8
|
Posted: Fri Jan 25, 2008 8:47 am Post subject: undefined reference to `__gdc_personality_v0' |
|
|
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 |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Fri Jan 25, 2008 3:06 pm Post subject: Re: undefined reference to `_D9gdkpixbuf12PixbufFormat12__Mo |
|
|
siegerstein wrote: | I have familiar problem here |
It looks like it's the exact same error.
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:
|
|
Back to top |
|
|
|