SDL_Timer?

56 views
Skip to first unread message

Mark Sibly

unread,
May 22, 2016, 10:47:31 PM5/22/16
to emscripten-discuss
Hi,

Does emscripten support SDL_Timer?

I can't seem to get it working and looking through the code it appears to depend on threads.

Bye!
Mark

Alon Zakai

unread,
May 23, 2016, 5:19:47 PM5/23/16
to emscripten-discuss
It's possible SDL1 timers never worked - I don't remember - but we have a test for SDL2 timers so they should be ok. See test_sdl2_timer in tests/test_browser.py

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Sibly

unread,
May 23, 2016, 5:33:13 PM5/23/16
to emscripte...@googlegroups.com
Hmm...where do I find this test?

In fact, which version of SDL2 should I be using? I'm currently using:


Which seems to be up-to-date, but I can't find that test...

Or should I just be using '-s USE_SDL=2'?

I prefer to build my own SDL2 though as I have a few custom fixes here and there for my own needs.


--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/Ooh27X_FdwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.

Mark Sibly

unread,
May 23, 2016, 6:09:11 PM5/23/16
to emscripte...@googlegroups.com
Ok, found the tests in the emscripten repos - doh!

I have attempted to run the tests with "python test2\runner.py" and a whole bunch of cryptic text is now flying by, but I am getting lots of:

KeyError: 'staticBump'
FAIL: Running the generated program failed!

Which doesn't sound good.

I am on windows 10 and used the standard emscripten installer (ie: didn't build from repos or anything like that).


Alon Zakai

unread,
May 23, 2016, 6:55:45 PM5/23/16
to emscripten-discuss
Recommended is SDL2 from ports, using USE_SDL2, yeah.

That staticBump error looks like a setup problem. emcc -v might show what is wrong, possibly using an old llvm.

Mark Sibly

unread,
May 23, 2016, 7:53:25 PM5/23/16
to emscripte...@googlegroups.com
Still no luck with timers or tests.

I tried emsdk update and it reckons there's a v1.36 available, but after install latest/actiavte latest it still says v1.35.

Any other ideas?

emcc -v output is:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 1.35.0
clang version 3.7.0 (https://github.com/kripken/emscripten-fastcomp-clang dbe68fecd03d6f646bd075963c3cc0e7130e5767) (https://github.com/kripken/emscripten-fastcomp.git 4e83be90903250ec5142edc57971ed4c633c5e25)
Target: x86_64-pc-windows-msvc
Thread model: posix
INFO:root:(Emscripten: Running sanity checks)

Aidan Hobson Sayers

unread,
May 26, 2016, 1:29:45 PM5/26/16
to emscripte...@googlegroups.com

You need to be on emscripten incoming, 1.36.0 is also too old. Timers were only added about a month ago.

Mark Sibly

unread,
May 26, 2016, 6:17:30 PM5/26/16
to emscripte...@googlegroups.com
Ah, OK.

I'm having trouble installing 'incoming' though...

emsdk install sdk-incoming-64bit

....downloads OK, but then get:

Running CMake: ['cmake', '-G', 'Visual Studio 12 Win64', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DPYTHON_EXECUTABLE=D:\\Emscripten\\python\\2.7.5.3_64bit\\python.exe', '-DLLVM_TARGETS_TO_BUILD=X86;JSBackend', '-DLLVM_INCLUDE_EXAMPLES=OFF', '-DCLANG_INCLUDE_EXAMPLES=OFF', '-DLLVM_INCLUDE_TESTS=OFF', '-DCLANG_INCLUDE_TESTS=OFF', 'D:/Emscripten/clang/fastcomp\\src']
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:54 (project):
  No CMAKE_C_COMPILER could be found.



CMake Error at CMakeLists.txt:54 (project):
  No CMAKE_CXX_COMPILER could be found.



-- Configuring incomplete, errors occurred!
See also "D:/Emscripten/clang/fastcomp/build_incoming_vs2013_64/CMakeFiles/CMakeOutput.log".
See also "D:/Emscripten/clang/fastcomp/build_incoming_vs2013_64/CMakeFiles/CMakeError.log".
CMake invocation failed due to exception!
Working directory: D:/Emscripten/clang/fastcomp\build_incoming_vs2013_64
Command '['cmake', '-G', 'Visual Studio 12 Win64', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '-DPYTHON_EXECUTABLE=D:\\Emscripten\\python\\2.7.5.3_64bit\\python.exe', '-DLLVM_TARGETS_TO_BUILD=X86;JSBackend', '-DLLVM_INCLUDE_EXAMPLES=OFF', '-DCLANG_INCLUDE_EXAMPLES=OFF', '-DLLVM_INCLUDE_TESTS=OFF', '-DCLANG_INCLUDE_TESTS=OFF', 'D:/Emscripten/clang/fastcomp\\src']' returned non-zero exit status 1
Installation failed!

I have VS2015 express (desktop) installed - do I need an older version?

Floh

unread,
May 27, 2016, 4:22:09 AM5/27/16
to emscripten-discuss
It looks like cmake is specifically asking for the Visual Studio 12 project generator (which is VS2013).

I had the same problem in my own cmake wrapper project, I fixed it there to not request a specific Visual Studio version, and instead use the -A option to enable 64-bit builds on Windows (e.g. cmake -A "x64"), however it looks like the -A command line option only exists cmake 3.1.

Cheers,
-Floh.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/Ooh27X_FdwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/Ooh27X_FdwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/Ooh27X_FdwY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages