View previous topic :: View next topic |
Author |
Message |
t4ch1k0m4
Joined: 27 Jan 2005 Posts: 11 Location: SAC
|
Posted: Thu Jan 27, 2005 6:46 pm Post subject: How to configure/setup and use DUI lib ? |
|
|
Hi,
I was wondering what is the proper way to set up and use the DUI ?
I've installed and compiled DUI and dool (I had to modify those make files), and tired out compiling & linking small examples, like HelloWorld example,
from the website.
I find that, i have to do compilation and linking, in two steps like this:
Passing the HelloWorl.d file to the script
#!/bin/bash
dmd -v -c $1 -I/_reiser_void0_/DUI/DUI/src:/_reiser_void0_/DUI/dool/src:~/dmd/src
gcc ${1/.*/}.o -o ${1/.*/} -lphobos -lpthread -lm -ldui -ldool `pkg-config --libs gtk+-2.0 gthread-2.0`
So im doing the liking with gcc help (seems very long).
Well, that was fine and compiled and linked, but now I tried a more 'difficult' example, like DUITreeWindow.d , which is in the src/test1 of the DUI distro, and when I run those steps above on it, I get linking errors :
DUITreeWindow.o(.gnu.linkonce.t_D4test13DUITreeWindow13DUITreeWindow5setupFZv+0xf): In function `_D4test13DUITreeWindow13DUITreeWindow5setupFZv':
: undefined reference to `_Class_4test7DUITree7DUITree'
DUITreeWindow.o(.gnu.linkonce.t_D4test13DUITreeWindow13DUITreeWindow5setupFZv+0x1d): In function `_D4test13DUITreeWindow13DUITreeWindow5setupFZv':
: undefined reference to `_D4test7DUITree7DUITree5_ctorFZC4test7DUITree7DUITree'
/usr/local/lib/libdui.a(Bin.o)(.gnu.linkonce.t_assert_3dui3Bin+0x11): In function `_assert_3dui3Bin':
: undefined reference to `_d_assert'
/usr/local/lib/libdui.a(Container.o)(.gnu.linkonce.t_assert_3dui9Container+0x11): In function `_assert_3dui9Container':
: undefined reference to `_d_assert'
/usr/local/lib/libdui.a(DUI.o)(.gnu.linkonce.t_assert_3dui3DUI+0x11): In function `_assert_3dui3DUI':
: undefined reference to `_d_assert'
/usr/local/lib/libdui.a(DUIObject.o)(.gnu.linkonce.t_assert_3dui9DUIObject+0x11): In function `_assert_3dui9DUIObject':
: undefined reference to `_d_assert'
/usr/local/lib/libdui.a(ListG.o)(.gnu.linkonce.t_assert_3dui5ListG+0x11): In function `_assert_3dui5ListG':
: undefined reference to `_d_assert'
/usr/local/lib/libdui.a(ObjectG.o)(.gnu.linkonce.t_assert_3dui7ObjectG+0x11): more undefined references to `_d_assert' follow
collect2: ld returned 1 exit status
Things go messed up. How to correct those errors ?
Also, I thought linking with dui and dool would suffice, but, seems I have to link with all those gtk and rest.
Anyway, anyone can help with this ? Im using (would like to) LInux version
of D and DUI /dool
Thanks !
|
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Fri Jan 28, 2005 8:27 am Post subject: Re: How to configure/setup and use DUI lib ? |
|
|
t4ch1k0m4 wrote: | Hi,
I was wondering what is the proper way to set up and use the DUI ?
...
Well, that was fine and compiled and linked, but now I tried a more 'difficult' example, like DUITreeWindow.d , which is in the src/test1 of the DUI distro, and when I run those steps above on it, I get linking errors :
...
|
I'll check it later today.
Can you look into the Makefile and see how it's done there?
Also the distributed version contains some garbage,
I don't remember if test1 should compile. Can you compile and link DUITests?
Ant |
|
Back to top |
|
|
t4ch1k0m4
Joined: 27 Jan 2005 Posts: 11 Location: SAC
|
Posted: Fri Jan 28, 2005 12:41 pm Post subject: Re: How to configure/setup and use DUI lib ? |
|
|
Hi,
I did manage to link that example later, after I have compiled the
private import test.DUITree, and added that *.o to the linking line.
I just dont understand, I thought, those imports compiler would sort out for me (as in, make the *.o itself and the rest).
Yes, I did manage to compile tests. However, i had to spend ___lots___ of time on those dui makefiles for them. Tests look nice, even the GL one works.
Anyway, how do I set up my environment to use the DUI libs ? That process that im doing now - first compiling with dmd (seems, i have to do it on per import basis) to get the *.o, then linking using gcc, against every lib, seems, that DUI lib uses, seems tedious and wrong to me. ( Altho Im new to D and dmd.)
How do you do it ? I thought, all I would have to do, is to link with libdool.a
libdui.a , and libduigl.a.
Thanks for help !
Ant wrote: | t4ch1k0m4 wrote: | Hi,
I was wondering what is the proper way to set up and use the DUI ?
...
Well, that was fine and compiled and linked, but now I tried a more 'difficult' example, like DUITreeWindow.d , which is in the src/test1 of the DUI distro, and when I run those steps above on it, I get linking errors :
...
|
I'll check it later today.
Can you look into the Makefile and see how it's done there?
Also the distributed version contains some garbage,
I don't remember if test1 should compile. Can you compile and link DUITests?
Ant |
|
|
Back to top |
|
|
Ant
Joined: 06 Mar 2004 Posts: 306 Location: Canada
|
Posted: Fri Jan 28, 2005 5:02 pm Post subject: Re: How to configure/setup and use DUI lib ? |
|
|
t4ch1k0m4 wrote: | Hi,
I did manage to link that example later
...
then linking using gcc, against every lib, seems, that DUI lib uses, seems tedious and wrong to me. ( Altho Im new to D and dmd.)
|
that's how I do it.
leds, my IDE for D, does it for me.
On Windows I create a small GUI front end just to do it.
As I understand linking can be done at runtime - other D libs do it.
Ant |
|
Back to top |
|
|
|
|
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
|