September 11, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
El 11/09/15 a les 11:05, Jordi Sayol via Digitalmars-d-learn ha escrit:
> El 11/09/15 a les 09:13, Mike McKee via Digitalmars-d-learn ha escrit:
>> On Friday, 11 September 2015 at 06:53:07 UTC, Mike James wrote:
>>> There's a Glade example in the demos/builder directory...
>>
>> I'm having trouble installing GtkD on Ubuntu Linux 14.04. I did the apt steps from here:
>>
>> http://d-apt.sourceforge.net/
>>
>> $ sudo su
>> # wget http://master.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list
>> # apt-get update && apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring && apt-get update
>> # apt-get install libgtkd3-dev libgtkd3-doc
>>
>> I then run the following and it fails:
>>
>> # dmd test1.d
>> test1.d(1): Error: module gtk is in file 'gtk.d' which cannot be read
>> import path[0] = /usr/include/dmd/phobos
>> import path[1] = /usr/include/dmd/druntime/import
>>
>
>
> On <http://d-apt.sourceforge.net/> there is the "pkg-config" section:
>
> ---
> pkg-config:
> Every dev package contains "pkg-config" (shared and static) configuration files for the specific library.
> i.e. link GtkD2 applications against "libgtkd2.so" and "libphobos2.so" shared libraries:
> $ dmd `pkg-config --cflags --libs gtkd2` my_gtkd2_app.d
> or link GtkD2 applications against "libgtkd2.a" and "libphobos2.a" static libraries:
> $ dmd `pkg-config --cflags --libs gtkd2-static` my_gtkd2_app.d
> ---
Just replace "gtkd2" by "gtkd3"
$ dmd `pkg-config --cflags --libs gtkd3` my_glade_app.d
$ dmd `pkg-config --cflags --libs gtkd3-static` my_glade_app.d
This works out of the box with the "builderTest.d" example on GtkD demos folder.
Regards
|
September 11, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike McKee | On Friday, 11 September 2015 at 07:13:22 UTC, Mike McKee wrote: > I'm having trouble installing GtkD on Ubuntu Linux 14.04. Here's an old guide I wrote years ago. It might be a little out of date but may help you put things together: http://nomad.so/2013/07/cross-platform-gui-programming-using-d-and-gtk/ |
September 11, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jordi Sayol | On Friday, 11 September 2015 at 09:07:37 UTC, Jordi Sayol wrote:
> On <http://d-apt.sourceforge.net/> there is the "pkg-config" section:
I finally got it to compile with your help, guys! :)
Here's what I had to type:
# dmd test1.d -L-ldl -I/usr/include/dmd/gtkd3 `pkg-config --cflags --libs gtkd3`
|
September 11, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike McKee | On Friday, 11 September 2015 at 14:00:30 UTC, Mike McKee wrote: > I finally got it to compile with your help, guys! :) > > Here's what I had to type: > > # dmd test1.d -L-ldl -I/usr/include/dmd/gtkd3 `pkg-config --cflags --libs gtkd3` Don't forget to answer yourself on SO too! http://stackoverflow.com/questions/32516092/how-to-show-hello-world-with-glade-gtkd-and-d-programming-language |
September 11, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike McKee | On 09/11/2015 04:00 PM, Mike McKee wrote: > On Friday, 11 September 2015 at 09:07:37 UTC, Jordi Sayol wrote: >> On <http://d-apt.sourceforge.net/> there is the "pkg-config" section: > > I finally got it to compile with your help, guys! :) > > Here's what I had to type: > > # dmd test1.d -L-ldl -I/usr/include/dmd/gtkd3 `pkg-config --cflags > --libs gtkd3` > You should be able to drop the -L-ldl and -I/usr/.... flags, as they are included in the pkg-config output. -- Mike Wey |
September 12, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Friday, 11 September 2015 at 20:29:05 UTC, Mike Wey wrote:
> You should be able to drop the -L-ldl and -I/usr/.... flags, as they are included in the pkg-config output.
I just tested and you are correct. Now, is there a way that I can edit /etc/dmd.conf and make it so that I don't need to do this pkg-config stuff all the time?
|
September 12, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike McKee Attachments:
| On Sat, 2015-09-12 at 06:58 +0000, Mike McKee via Digitalmars-d-learn wrote: […] > I just tested and you are correct. Now, is there a way that I can edit /etc/dmd.conf and make it so that I don't need to do this pkg-config stuff all the time? I think editing /etc/dmd.conf would be the wrong way forward on this. I would suggest using one of SCons, CMake, Make as a build tool and encode this in the build rules. Once you get to a GtkD application bigger than "Hello World" create a project and use Dub. -- Russel. ============================================================================= Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder@ekiga.net 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel@winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder |
September 12, 2015 Re: Hello World Example with Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Russel Winder | On Saturday, 12 September 2015 at 09:03:53 UTC, Russel Winder wrote:
> Once you get to a GtkD application bigger than "Hello World" create a project and use Dub.
Oh yes, Dub. That's the ticket. Thanks, mate.
|
Copyright © 1999-2021 by the D Language Foundation