-
Notifications
You must be signed in to change notification settings - Fork 71
Hello World Example on Windows 10
Feldwor edited this page May 13, 2020
·
2 revisions
- Install Digital Mars D Compiler (DMD)
https://dlang.org/download.html - Install Gtk+ Runtime https://gtkd.org/download.html
- Create a new text-file on the Desktop named HelloWorld.d (replace .txt extension with .d)
#!/usr/bin/env dub /+ dub.sdl: name "HelloWorld" dependency "gtk-d" version="*" +/ 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(); }
- Open Command Prompt and Paste in:
dub run --single --arch=x86 --build=plain --force HelloWorld.d
- After 20-30 seconds (Might take few minutes for slower hardware) you should see the example opened on your screen.