Ofelia icon indicating copy to clipboard operation
Ofelia copied to clipboard

emscripten compile error

Open Reinissance opened this issue 4 years ago • 8 comments

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

Reinissance avatar Apr 29 '20 13:04 Reinissance

Hi, did you run the updateOF.sh script? Also, what OF version do you use?

cd OF/addons/ofxOfelia/scripts/Emscripten
sudo ./updateOF.sh

cuinjune avatar Apr 29 '20 14:04 cuinjune

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...

Reinissance avatar Apr 29 '20 18:04 Reinissance

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.

cuinjune avatar Apr 29 '20 21:04 cuinjune

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

Reinissance avatar Apr 30 '20 07:04 Reinissance

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?

cuinjune avatar Apr 30 '20 17:04 cuinjune

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.

Reinissance avatar Apr 30 '20 17:04 Reinissance

Back again:

Firefox Console gave this:

FF1

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

FF2

At this stage Chormes Consol gives:

Chr

Reinissance avatar May 01 '20 20:05 Reinissance

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" />

Jonathhhan avatar May 02 '20 23:05 Jonathhhan