hello, i'm trying compile urho3d with nim for very long time, but cant do it. i 
tried compile it with mingw, with tdm-g++, with vs2019, with g++ on linux, but 
nothing compiles. i have this code: 
    
    
    {.emit: """#include <Urho3D/Engine/Application.h>
    #include <Urho3D/Engine/Engine.h>
    #include <Urho3D/Input/InputEvents.h>
    
    using namespace Urho3D;
    class MyApp : public Urho3D::Application
    {
    public:
            MyApp(Context* context) :
                    Application(context)
            {
            }
            virtual void Setup()
            {
                    // Called before engine initialization. engineParameters_ 
member variable can be modified here
            }
            virtual void Start()
            {
                    // Called after engine initialization. Setup application & 
subscribe to events here
                    Urho3D::Object::SubscribeToEvent(Urho3D::E_KEYDOWN, 
URHO3D_HANDLER(MyApp, HandleKeyDown));
            }
            virtual void Stop()
            {
                    // Perform optional cleanup after main loop has terminated
            }
            void HandleKeyDown(StringHash eventType, VariantMap& eventData)
            {
                    using namespace KeyDown;
                    // Check for pressing ESC. Note the engine_ member variable 
for convenience access to the Engine object
                    int key = eventData[P_KEY].GetInt();
                    if (key == KEY_ESCAPE)
                            engine_->Exit();
            }
    };""".}
    {.emit:"""int 
RunApplication(){Urho3D::SharedPtr<Urho3D::Context>context(new 
Urho3D::Context());Urho3D::SharedPtr<MyApp>application(new 
MyApp(context));return application->Run();}""".}
    type
        lpwstr=object{.importcpp:"LPWSTR".}
    proc runApplication:int{.importcpp:"RunApplication".}
    proc getCommandLine:lpwstr{.importcpp:"GetCommandLineW".}
    proc parseArguments(a:lpwstr){.importcpp:"Urho3D::ParseArguments(@)".}
    parseArguments(getCommandLine())
    quit runApplication()
    
    Run

(it compiles with --app:gui) please, help me, how i can compile this code?

Reply via email to