buggins / dlangui

Cross Platform GUI for D programming language
Boost Software License 1.0
815 stars 121 forks source link

Failed compiling project with dlangui 0.9.187 #619

Closed oracle1wr closed 1 year ago

oracle1wr commented 2 years ago

Hello I'm trying to build a simple example, but having difficulties to compile/run the app. Is this something obvious?

DMD64 D Compiler v2.090.1 dlangui 0.9.187

.dub/packages/dlangui-0.9.187/dlangui/src/dlangui/widgets/charts.d(387,13): Error: undefined identifier isClose .dub/packages/dlangui-0.9.187/dlangui/src/dlangui/widgets/charts.d(403,13): Error: undefined identifier isClose .dub/packages/dlangui-0.9.187/dlangui/src/dlangui/widgets/charts.d(467,13): Error: undefined identifier isClose

GrimMaple commented 2 years ago

Hello! I just downloaded the 0.9.187 version and compiled it without any problems. Can you please add more info, e.g. the operating system you're using, and the sample code you're trying to compile?

oracle1wr commented 2 years ago

sure, I'm on Ubuntu 18.04 the code is from samples:

module app;
import dlangui;
import core.time;
import core.thread;

import bridge;

mixin APP_ENTRY_POINT;
extern (C) int UIAppMain(string[] args) {

    auto m = new _init;

    Window window = Platform.instance.createWindow("DlangUI example - HelloWorld", null);
    //window.maximizeWindow();
    //window.moveAndResizeWindow(Rect(0,0,1600,1200));
    VerticalLayout panel = new VerticalLayout();
    auto  button1 = new Button().text("Hello, world!"d).margins(Rect(100,100,100,100));

    bool handle(Widget src){
        window.showMessageBox(UIString.fromRaw("Обработчик onClick"d), UIString.fromRaw("Вызван\ndelegate"d));
        return true;
    }
    button1.addOnClickListener(&handle);
    panel.addChild(button1);

    window.mainWidget = (panel);
    window.show();
    return Platform.instance.enterMessageLoop();
}

It works with dlangui 0.9.186.

GrimMaple commented 2 years ago

This works fine on my Windows box. I think this is caused by an outdated compiler. isClose was introduced in dmd 2.091.0: https://dlang.org/changelog/2.091.0.html#isClose

Can you upgrade your compiler in any way?

GrimMaple commented 1 year ago

I tagged that dlangui needs dmd 2.100 anyway. If a specific older version of D is needed, please open another issue.