Ofelia
Ofelia copied to clipboard
emscripten compile error
Hey, cuinjune, first of all, thanks fro this awesome project!!!
Trying to compile the EmscriptenExample on mac Catalina I get the error:
invalid argument '-std=c++14' not allowed with 'C'
any suggestions, anyone?
Thx
Hi, did you run the updateOF.sh
script? Also, what OF version do you use?
cd OF/addons/ofxOfelia/scripts/Emscripten
sudo ./updateOF.sh
Oh, yes, You´re right, I simply seem to have missed this step.
I started from scratch taking a closer look but now I´m stuck here:
.../of_v20200429_osx_release/addons/ofxOfelia/libs/ofxLua/src/bindings/glmBindings.cpp:2733:10: fatal error: 'glm/gtc/functions.hpp' file not found #include <glm/gtc/functions.hpp>
The file is there, in OF/libs/glm/include/glm/gtx/functions.hpp, but the compiler doesn´t find it for some reason...
I'm sorry I didn't update Ofelia for the latest version yet.
Please copy the whole text from https://raw.githubusercontent.com/danomatika/ofxLua/master/src/bindings/glmBindings.cpp
then paste it into your OF/addons/ofxOfelia/libs/ofxLua/src/bindings/glmBindings.cpp
file and then build emscripten again using emmake make
. I just tried it and it worked.
Thank You very much, that did the trick, now it compiles fine. But when opening the page, both Chrome and Firefox stuck „downloading...“ - do I first have to start a local server or something? Regards
It works fine for me when I just run the following:
emmake make
emrun bin/EmscriptenExample.html
So you don't need to start a local server or anything. Can you open the developer console in Chrome (Command + option + J) and see if you see any error messages?
Yes, did that, chrome gives no output in console. Maybe I just haven’t been patient enough, will try once more, when I‘ at home.
Back again:
Firefox Console gave this:
So I just copied favicon.ico from emsdk/node/12.9.1_64bit/lib/node_modules/npm/html into EmscriptenExample/bin to get it run, then it gave me
At this stage Chormes Consol gives:
Possibly a duplicate of this issue https://github.com/cuinjune/Ofelia/issues/20? Not sure which is the best solution... Regarding the favicon issue: I finally used a base64 string in the html file, because I had some problems with ssl encrypted pages and the ico file (which is not an ofelia or emscripten related issue).
<link href="data:image/x-icon;base64,AAABAAEAEBAQAAEABAAoAQAAFgAAACgAAAAQAAAAIAAAAAEABAAAAAAAgAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEREREQAAAAARERERAAAAABEREREAAAAAEREREQAAAAARERERAAAAABEREREAAAAAEREREQAAAAARERERAAAAABEREREAAAAAEREREQAAAAARERERAAAAABEREREAAAAAEREREQAAAAARERERAAAAABEREREAAAAAEREREQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" rel="icon" type="image/x-icon" />