Hello everyone, I am new here and I just built Urho3d from source and I am trying to run it but I end up getting an error at the line of “URHO3D_DEFINE_APPLICATION_MAIN(MyApp)”
here is the code :
#include <Urho3D/Engine/Application.h>
#include <Urho3D/Engine/Engine.h>
#include <Urho3D/Input/InputEvents.h>
using namespace Urho3D;
class MyApp : public 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
SubscribeToEvent(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_ESC)
engine_->Exit();
}
}
URHO3D_DEFINE_APPLICATION_MAIN(MyApp)
I just want to make sure I built it correctly. Here is a screenshot. Thank you in advance