I am having the same problem.
I tried setting the http-server too, but it fails in the same way.
I am in High Sierra and OF GitHub branch.
I didn’t know how to setup this (from OF website):
(Maybe this can be the problem…)So I need to run source ./emsdk_env.sh every time…
type source ./emsdk_env.sh to set the system path to the active version of Emscripten. You can copy the output of this command and add it to your .profile file, in order to save this variables also for the next sessions.
I open a terminal: cd /Users/myUser/Documents/emsdk
then I run: source ./emsdk_env.sh
run: cd /Users/myUser/Documents/openFrameworks/examples/gui
create project with PG with emscripten template.
run: emmake make emrun --browser chrome bin/guiExample.html
so, @stephanschulz, you can try this way.
it’s working here fine. The local http server setup was not required when you run the app with emrun --browser chrome bin/advanced3dExample.html
because it seems ‘it runs his own server’
I noticed that when running the emscripten/download_libs.sh, macOS building stops working, so we can’t share the OF folder to both buildings.
how can we add the profile to the system to avoid running source ‘./emsdk_env.sh’ every session?
there’s any way to made it run in Safari? What are the main limitations of Emscripten vs native app?
Thats what I found so far…
opened a new terminal window.
since I already followed the earlier install steps I just had to redo the last two steps.
./emsdk activate sdk-incoming-64bit binaryen-master-64bit
then in the same terminal window cd to the project folder.
then call emmake make
and the build worked
I did not need to install via /openFrameworks/scripts/emscripten/download_libs.sh
@stephanschulz Did you also delete the emscripten folder of the guiExample? Normally the changes should take effect if it runs at all. Regarding your own example: Is it possible that you use some addons or functions that are not compatible with Emscripten? There seems something wrong with a .txt file…
@Jona thanks for pointing this out. I only now notice that running emmake creates a folder called obj with an Emscripten folder inside.
@Theo as mentioned earlier I am now able to compile and run guiExample. BUT as soon as I add gui.loadFromFile(“settings.xml”); to setup() the app will not run successfully in the browser. I guess Emscripten apps do not like loading and writing to disk?
files in data are packed in a special format and served as a file system emulation when you use emmake make run so it should work. if you compile the aplication in debug you should get a proper stack trace when the app crashes which will give you a clue of what might be going on.