GTKD - Application crashes - or not? [Coedit]

TheDGuy via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 15 02:48:19 PDT 2016


Hi,
this is my app:

import gtk.Main;
import gtk.MainWindow;
import gtk.CssProvider;
import gdk.Display;
import gdk.Screen;
import gtk.StyleContext;
import glib.GException;

class Window : MainWindow{
     this(int width, int height, string title){
         super(title);
         setDefaultSize(width, height);

         string cssPath = "test.css";

         CssProvider provider = new CssProvider();
         provider.loadFromPath(cssPath);

         Display display = Display.getDefault();
         Screen screen = display.getDefaultScreen();
         StyleContext.addProviderForScreen(screen, provider, 
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);

         showAll();
     }
}

void main(string[] args){
     Main.init(args);
     auto win = new Window(250,250,"Tutorial");
     Main.run();
}

I use Coedit to write and execute D apps. If i execute this app i 
get the error message (it compiles fine):

glib.GException.GException at ..\..\..\AppData\Roaming\dub\packages\gtk-d-3.3.1\gtk-d\src\glib\GException.d(40): Failed to import: No such file or directory
----------------
0x00430569
0x00402065
0x004020D8
0x0040275F
0x00402660
0x004020F7
0x740F38F4 in BaseThreadInitThunk
0x76F85DE3 in RtlUnicodeStringToInteger
0x76F85DAE in RtlUnicodeStringToInteger
error: the process 
(C:\Users\Standardbenutzer\Documents\Dlang_Projects\GTKD_Test.exe) has returned the signal 1

But if i execute the app my hand (in the windows command window 
or my double click) it works as expected (so no error)? Why is 
that?


More information about the Digitalmars-d-learn mailing list