Getting FLTK to run without issues in the browser

73 views
Skip to first unread message

Mo_Al_

unread,
Sep 25, 2024, 11:29:42 AM9/25/24
to emscripten-discuss
Hi all,

I'm working on getting FLTK to work on the browser. Support code here:

Demo here:
https://moalyousef.github.io/fltk_emscripten/

I use emscripten_sleep() in the event loop. This is needed for shown dialogs and menu windows. However due to it not supporting reentrancy, I sometimes get crashes/errors when spawning a dialog or menu window.

I'm wondering if you have suggestions to work around that?
Is there a way to detect that emscripten_sleep() is currently waiting and avoiding reentrancy?

I appreciate all suggestions.
Thank you

Tommie Moore

unread,
Feb 12, 2025, 6:37:34 PMFeb 12
to emscripten-discuss
How is this used I have looked at the gif repository, and it looks exactly like the default fltk library.  Does this compile with an emcc *.cpp -o demo.html command?

Tommie Moore

unread,
Feb 13, 2025, 6:07:46 PMFeb 13
to emscripten-discuss
I managed to get FLTK to compile with the emcmake commands, but how do I target external code in other folders? 

Mohammed

unread,
Feb 13, 2025, 6:39:56 PMFeb 13
to emscripte...@googlegroups.com
I’m not sure I understand the question. 
Do you mean build your code which uses FLTK?

Sent from my iPhone

On 14 Feb 2025, at 02:07, Tommie Moore <tm...@humboldt.edu> wrote:

I managed to get FLTK to compile with the emcmake commands, but how do I target external code in other folders? 
--
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/NS-IAsPA51I/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/emscripten-discuss/5c541972-deb1-4be0-98bd-5a04ab6a250fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages