Dlang with Dlangui not working on Debian12 (oldstable)

GrimMaple grimmaple95 at gmail.com
Thu Dec 4 07:50:58 UTC 2025


On Monday, 1 December 2025 at 17:03:31 UTC, rnd2 wrote:
> The title says it all.
> I am working on Debian12 which recently became OldStable from 
> Stable.
> I installed gdmd and dub from Debian repositories.
> Hence I have following versions:
>
>     $ dub --version
>     DUB version 1.27.0-3, built on Aug 13 2022
>
>     $ gdmd --version
>     gdc (Debian 12.2.0-14+deb12u1) 12.2.0
>     Copyright (C) 2022 Free Software Foundation, Inc.
>     This is free software; see the source for copying 
> conditions.  There is NO
>     warranty; not even for MERCHANTABILITY or FITNESS FOR A 
> PARTICULAR PURPOSE.
> 	
>
>     $ ldc2 --version
>     LDC - the LLVM D compiler (1.30.0):
>       based on DMD v2.100.1 and LLVM 14.0.6
>       built with LDC - the LLVM D compiler (1.30.0)
>       Default target: x86_64-pc-linux-gnu
>       Host CPU: ivybridge
>       http://dlang.org - http://wiki.dlang.org/LDC
>
>
> I tried to build some simple applications using Dlangui and 
> gdmd or ldc2m but all failed.
>
> One source code is as follows:
>
>     import dlangui.platforms.sdl.sdlapp; // App, Window, 
> Button, etc.
>     import std.stdio;
>     int main(string[] args)
>     {
>         auto app = new App(args);                     // <- App 
> is from sdlapp.d
>         auto win = app.createWindow("DlangUI SDL Test", 400, 
> 300);
>         auto btn = new Button("Click Me");           // <- 
> Button is from sdlapp.d
>         win.addChild(btn);
>         // Button click handler must return bool
>         btn.click = (widget) {
>             writeln("Button clicked!");
>             return true;
>         };
>         win.show();
>         return app.run();
>     }
>
> And dub.json file is as follows:
>
>     {
>         "name": "mydlangui",
>         "description": "Minimal DlangUI SDL application",
>         "authors": ["cardio"],
>         "license": "proprietary",
>         "version": "0.0.1",
>         "dependencies": {
>             "dlangui": "~>0.10.8"
>         }
>     }
>
> The error is as follows:
>
>     $ dub build --compiler=ldc2
>     Performing "debug" build using ldc2 for x86_64.
>     arsd-official:characterencodings 10.9.10: target for 
> configuration "library" is up to date.
>     arsd-official:dom 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:color_base 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:bmp 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:imageresize 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:jpeg 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:png 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:svg 10.9.10: target for configuration 
> "library" is up to date.
>     arsd-official:image_files 10.9.10: target for configuration 
> "library" is up to date.
>     bindbc-common 0.1.6: target for configuration "noBC" is up 
> to date.
>     bindbc-loader 1.1.5: target for configuration "noBC" is up 
> to date.
>     bindbc-freetype 1.2.6: target for configuration "dynamic" 
> is up to date.
>     bindbc-opengl 1.1.1: target for configuration "dynamic" is 
> up to date.
>     bindbc-sdl 1.4.8: target for configuration "dynamic" is up 
> to date.
>     inilike 1.2.3: target for configuration "library" is up to 
> date.
>     isfreedesktop 0.1.1: target for configuration "library" is 
> up to date.
>     xdgpaths 0.2.5: target for configuration "library" is up to 
> date.
>     icontheme 1.2.3: target for configuration "library" is up 
> to date.
>     dlangui 0.10.8: target for configuration "default" is up to 
> date.
>     mydlangui 0.0.1: building configuration "application"...
>     source/app.d(5,16): Error: undefined identifier `App`, did 
> you mean module `app`?
>     source/app.d(7,16): Error: undefined identifier `Button`
>     ldc2 failed with exit code 1.
>
>
> Where is the problem and how can it be solved? Thanks for your 
> help.

I don't think those come from the module you imported. Try 
importing `import dlangui;`, it should import "the world"


More information about the Digitalmars-d mailing list