I have MinGW on Windows. I downloaded Urho3D-1.7.1-MinGW-STATIC and I placed the “include” and “lib” folders here:
- E:\Libs\Urho3D-1.7.1-MinGW-STATIC\include
- E:\Libs\Urho3D-1.7.1-MinGW-STATIC\lib\Urho3D
The “lib\Urho3D” folder contains the “libUrho3D.a” file.
I wrote a very simple example with minimal code to show that it compiles and works:
#include <iostream>
#include <Urho3D/Engine/Application.h>
class MyApp : public Urho3D::Application
{
public:
MyApp(Urho3D::Context * context) : Urho3D::Application(context)
{
}
virtual void Setup()
{
std::cout << "Setup" << std::endl;
}
};
URHO3D_DEFINE_APPLICATION_MAIN(MyApp)
I try to compile it using this command:
g++ main.cpp -I"E:\Libs\Urho3D-1.7.1-MinGW-STATIC\include" -L"E:\Libs\Urho3D-1.7.1-MinGW-STATIC\lib\Urho3D" -lUrho3D -o app.exe
I see a lot of errors like:
E:\Libs\Urho3D-1.7.1-MinGW-STATIC\lib\Urho3D/libUrho3D.a(SDL_winmm.c.obj):SDL_winmm.c:(.text+0x942): undefined reference to `_imp__waveOutGetNumDevs@0’
E:\Libs\Urho3D-1.7.1-MinGW-STATIC\lib\Urho3D/libUrho3D.a(SDL_winmm.c.obj):SDL_winmm.c:(.text+0x97b): undefined reference to `_imp__waveOutGetDevCapsW@12’
E:\Libs\Urho3D-1.7.1-MinGW-STATIC\lib\Urho3D/libUrho3D.a(SDL_winmm.c.obj):SDL_winmm.c:(.text+0xa32): undefined reference to `_imp__waveInAddBuffer@12’