I have succesfully compiled StaticScene.cpp through Emscripten compiler. But when I open StaticScene.html, I get “Exception thrown, see JavaScript console” in Urho3D console I get
[Fri Dec 18 11:17:26 2015] WARNING: Could not get application preferences directory
[Fri Dec 18 11:17:26 2015] INFO: Opened log file StaticScene.log
[Fri Dec 18 11:17:26 2015] INFO: Added resource package Data.pak
[Fri Dec 18 11:17:26 2015] INFO: Added resource package CoreData.pak
[Fri Dec 18 11:17:26 2015] INFO: Set screen mode 1024x768 windowed
[Fri Dec 18 11:17:26 2015] INFO: Initialized input
[Fri Dec 18 11:17:26 2015] INFO: Initialized user interface
[Fri Dec 18 11:17:26 2015] INFO: Initialized renderer
[Fri Dec 18 11:17:26 2015] INFO: Set audio mode 44100 Hz stereo interpolated
[Fri Dec 18 11:17:26 2015] INFO: Initialized engine
-1
In the result, I get only black screen.
However, HelloWorld example works fine. I suppose that is something wrong with scene and resource loading.
I compile example with following command - emcc -I"mypathtoincludefolder" -Wno-invalid-offsetof -ffast-math -m32 -Wno-
warn-absolute-paths -Wno-unknown-warning-option --preload-file CoreData.pak --us
e-preload-cache --preload-file Data.pak --use-preload-cache -s ALLOW_MEMORY_GROW
TH=1 -O2 StaticScene.cpp -o StaticScene.html -l"..\libUrho3D" -lGL -s USE_SDL
=2 -D"URHO3D_STATIC_DEFINE"
Platform - win32. Also I get next warnings when compilation is done. Maybe that was the reason why example does not work properly.
warning: unresolved symbol: posix_spawn
warning: unresolved symbol: posix_spawn_file_actions_init
warning: unresolved symbol: posix_spawn_file_actions_destroy
warning: unresolved symbol: _ZNK6Urho3D4Node12GetComponentENS_10StringHashEb
warning: unresolved symbol: posix_spawn_file_actions_adddup2
So, How i can get working StaticScene example ? Thanks.