I have builded Urho3D library through CMake and get Urho3D.a file. Then I create my own Codeblocks GUI project and link Urho3D.a file. After this I add Urho3D includes, MyProgramApp.cpp and MyProgramApp.hpp file. In the file MyProgramApp.hpp I write MyProgram class, that is inherited from Urho3D::Application and write DEFINE_APPLICATION_MAIN(HangarsClientApp) after it, like this :
[code]class MyProgramApp : public Application
{
OBJECT(MyProgramApp)
public:
// Constructors
MyProgramApp(Context* context);
virtual ~MyProgramApp();
public:
// Application class overrided functions
virtual void Setup();
virtual void Start(); // Called after engine initialization. Setup application & subscribe to events here
virtual void Stop(); // Perform optional cleanup after main loop has terminated
};
DEFINE_APPLICATION_MAIN(MyProgramApp)[/code]
In the result, I get undefined reference to `WinMain@16’|
Platform : Win32. Compiler: gcc 5.2.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project)
How I can fix it ?