On Saturday, 16 February 2019 at 13:35:57 UTC, Ron Tarrant wrote:
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
Being an old linux user, I prefer make to dub, however, I do use
dub to build GtkD and then I just use dmd to build my application
program. Here is a transcript of building and running the first
tutorial exercise on my computer that runs LinuxMint. It all
works nicely, when pointing the DMD compiler to the generated
gtkd bindings and the linker to the dub-built library file.
peterj@helmholtz ~/work/play/dlang/GtkD $ dub clean
Cleaning package at /home/peterj/work/play/dlang/GtkD...
peterj@helmholtz ~/work/play/dlang/GtkD $ dub build
Performing "debug" build using /usr/bin/dmd for x86_64.
gtk-d:gtkd ~master: building configuration "library"...
generated/gtkd/glib/Spawn.d(305,3): Deprecation: foreach: loop
index implicitly converted from size_t to int
gtk-d:gstreamer ~master: building configuration "library"...
gtk-d:peas ~master: building configuration "library"...
gtk-d:sv ~master: building configuration "library"...
gtk-d:vte ~master: building configuration "library"...
peterj@helmholtz ~/work/play/dlang/GtkD $ cd ../gtkd-example/
peterj@helmholtz ~/work/play/dlang/gtkd-example $ make
dmd -w -g -debug -I=../GtkD/generated/gtkd \
-oftest_rig_imperative test_rig_imperative.d \
-L../GtkD/libgtkd-3.a
peterj@helmholtz ~/work/play/dlang/gtkd-example $
./test_rig_imperative
Hello GtkD Imperative
Bye.
peterj@helmholtz ~/work/play/dlang/gtkd-example $ dmd --version
DMD64 D Compiler v2.085.0-beta.1
Copyright (C) 1999-2019 by The D Language Foundation, All Rights
Reserved written by Walter Bright