Linux & DMD & GtkD

Jordi Sayol g.sayol at gmail.com
Sun Feb 17 14:19:35 UTC 2019


El 16/2/19 a les 14:35, Ron Tarrant via Digitalmars-d-learn ha escrit:
> Hi guys,
> 
> I finally got a Linux Mint installation happening (very impressed, BTW) and did the usual HelloWorld.d compile with dmd, but I'm having trouble working out how to link to GtkD.
> 
> dmd -de -w -m64 -L+gtkd hello_gtkd_world.d
> 
> says it can't find MainWindow which tells me the gtkd libraries are not installed, are not included in the path, or some other oversight on my part.
> 
> I tried using whereis to find gtkd, but to no avail.
> 
> Questions:
> 
> 1. Am I using the right syntax in the above command line?
> 
> 2. How to search for things on Linux Mint
> 
> The recommendations I've found so far are for the gnome search tool which spits out an error:
> 
> Package gnome-search-tool is not available, but is referred to by another package.
> This may mean that the package is missing, has been obsoleted, or
> is only available from another source
> 

Hello Ron,

There is "d-apt" <https://d-apt.sourceforge.io/> where there are dmd and gtkd deb for Linux Mint.

To add this repository to your Linux Mint just run this two lines from command line:

$ sudo wget https://netcologne.dl.sourceforge.net/project/d-apt/files/d-apt.list -O /etc/apt/sources.list.d/d-apt.list

$ sudo apt-get update --allow-insecure-repositories && sudo apt-get -y --allow-unauthenticated install --reinstall d-apt-keyring && sudo apt-get update

After that you can install all the packages on "d-apt".


To install dmd compiler, dmd doc, gtkd devel and gtkd doc packages just run the next line:

$ sudo apt-get install dmd-compiler dmd-doc libgtkd3-dev libgtkd3-doc


Then you can compile/run a GtkD example contained on gtkd doc archive. To do that just run the next line:

$ dmd `pkg-config --cflags --libs gtkd-3` -run /usr/share/libgtkd3-doc/demos/gtkD/TestWindow/*.d -ofTestWindow


To run the compiled example just type:

$ ./TestWindow


There are more examples at /usr/share/libgtkd3-doc/demos/


Hope this help you.

Jordi


More information about the Digitalmars-d-learn mailing list