On Sunday, 22 December 2013 at 14:52:23 UTC, Russel Winder wrote:
On Sun, 2013-12-22 at 13:29 +0000, Amateur wrote:
Hello,

I'm beginning with programming on desktop. After choosing which
language is "da best" for me, I chose D. And now I want to create
GUI applications, so I tried installing GtkD and I failed. Can
anybody give me a short manual?

I cloned the Git repository for GtkD and then set up a bash script to give the GtkD make system all the right parameters so I could compile it for DMD, GDC and LDC2. However this is not trivial unless you are
familiar with Make.

However I also just tried using Dub and it works very nicely. I think
the general opinion will these days be to use Dub.

I'd like to code on linux (openSUSE 13.1), but if I'll get help
on Windows, I'll be happy too.

I only have Debian and Fedora Linux and OS X, I don't do Windows ;-)

Hello again. I have successfully installed dub and made GtkD dependency. But...

I tried to compile this code:

import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args)
{
    Main.init(args);
    MainWindow win = new MainWindow("Hello World");
    win.setDefaultSize(200, 100);
    win.add(new Label("Hello World"));
    win.showAll();
    Main.run();
}

But compiler said that he won't compile this, because "app.d(1): Error: module MainWindow is in file 'gtk/MainWindow.d' which cannot be read". Etc. for other imports.

So I copied libraries in /source directory and now compiler knows, from where can he import, but compiler is yelling another errors.

app.o:(.data+0x10): undefined reference to `_D3gtk10MainWindow12__ModuleInfoZ' app.o:(.data+0x18): undefined reference to `_D3gtk5Label12__ModuleInfoZ' app.o:(.data+0x20): undefined reference to `_D3gtk4Main12__ModuleInfoZ'
app.o: In function `_Dmain':
app.d:(.text._Dmain+0x15): undefined reference to `_D3gtk4Main4Main4initFKAAyaZv' app.d:(.text._Dmain+0x1b): undefined reference to `_D3gtk10MainWindow10MainWindow7__ClassZ' app.d:(.text._Dmain+0x3a): undefined reference to `_D3gtk10MainWindow10MainWindow6__ctorMFAyaZC3gtk10MainWindow10MainWindow' app.d:(.text._Dmain+0x5b): undefined reference to `_D3gtk5Label5Label7__ClassZ' app.d:(.text._Dmain+0x85): undefined reference to `_D3gtk5Label5Label6__ctorMFAyabZC3gtk5Label5Label' app.d:(.text._Dmain+0xa9): undefined reference to `_D3gtk4Main4Main3runFZv'
collect2: error: ld returned 1 exit status
--- errorlevel 1

Reply via email to