britzl / extension-imgui

Dear ImGUI extension for Defold
MIT License
58 stars 19 forks source link

It fails to load, in example project #57

Closed ahmutkadim closed 4 months ago

ahmutkadim commented 4 months ago

I just downloaded the project from the releases and loaded it with Defold, but encountered an error when building for debug. The message is as follows:

/imgui/src/extension_imgui.cpp
    Line 2519: cannot initialize a parameter of type 'FCallback' (aka 'ExtensionResult (*)(ExtensionParams *)') with an lvalue of type 'dmExtension::Result (dmExtension::Params *)' (aka 'dmExtension::Result (ExtensionParams *)'): different return type ('ExtensionResult' vs 'dmExtension::Result')
    dmExtension::RegisterCallback(dmExtension::CALLBACK_POST_RENDER, imgui_Draw );
                                                                     ^~~~~~~~~~
    Line 2519: passing argument to parameter 'func' here
    bool RegisterCallback(CallbackType callback_type,FCallback func);
                                                               ^
    Line 3041: comparison of different enumeration types in switch statement ('enum ExtensionEventID' and 'dmExtension::EventID') [-Wenum-compare-switch]
        case dmExtension::EVENT_ID_ACTIVATEAPP:
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Line 3044: comparison of different enumeration types in switch statement ('enum ExtensionEventID' and 'dmExtension::EventID') [-Wenum-compare-switch]
        case dmExtension::EVENT_ID_DEACTIVATEAPP:
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Line 3047: comparison of different enumeration types in switch statement ('enum ExtensionEventID' and 'dmExtension::EventID') [-Wenum-compare-switch]
        case dmExtension::EVENT_ID_ICONIFYAPP:
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Line 3050: comparison of different enumeration types in switch statement ('enum ExtensionEventID' and 'dmExtension::EventID') [-Wenum-compare-switch]
        case dmExtension::EVENT_ID_DEICONIFYAPP:
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
britzl commented 4 months ago

The latest version of the extension is updated to support Defold 1.9.0: https://github.com/britzl/extension-imgui/releases/tag/2.2.0

If you are using an older version of Defold you need to use this release instead: https://github.com/britzl/extension-imgui/releases/tag/2.1.1