Thank you. I added another library and I am getting closer. Now I am seeing this, at which I can't even guess...
[~/d/GtkD-3.6.5/demos/gl/simple] $ dmd SimpleGL.d -I~/d/GtkD-3.6.5/generated/gtkd -I~/d/GtkD-3.6.5/generated/gtkdgl -L-L~/d/GtkD-3.6.5/ -L-lglgdk-3 -L-lGL -L-ldl
/home/alan/d/GtkD-3.6.5/generated/gtkdgl/glgtk/GLCapability.d(93): Error: variable simpleGL.SimpleGL.SimpleGL.GLCapability!().drawFrame.cr default construction is disabled for type Scoped
/home/alan/d/GtkD-3.6.5/generated/gtkdgl/glgtk/GLCapability.d(94): Error: struct std.typecons.scoped!(Context).Scoped is not copyable because it is annotated with @disable
On Thu, 20 Jul 2017 19:18:15 +0200, Mike Wey wrote:
On 20-07-17 16:04, Alan Turvey wrote:
I am new to D on linux and I have compiled and run the TestWindow sample. I thought the next step might be to work with the SimpleGL example:
demos/gl/simple/SimpleGL.d
But I have been unable to compile it. This is where I am up to.
[~/d/GtkD-3.6.5/demos/gl/simple]$ dmd SimpleGL.d -L-L~d/GtkD-3.6.5/ -L-lgtkd-3 SimpleGL.d(21): Error: module Event is in file 'gdk/Event.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import
I know an Event object is in the libgtkd-3 library...
[~/d/GtkD-3.6.5]$ ar -t libgtkd-3.a | grep "Event" EventSequence.o Event.o EventController.o EventBox.o
Could someone add a makefile or let me know how to compile and link this SimpleGL.d file?
You are missing the path the the GtkD source files and the opengl library.
dmd SimpleGL.d -I~d/GtkD-3.6.5/generated/gtkd -L-L~d/GtkD-3.6.5/ -L-lgtkd-3 -L-lGL -L-ldl
And if you used
make install
or installed GtkD with the package
manager of your distribution (if available), you could use pkg-config.dmd `pkg-config --cflags --libs gtkd-3` -L-lGL