Emscripten error while using addons such as ofxTween

Hi Guys,
I am trying to port a project from 0.8.1 to 0.9 so that I could use it as part of web.

Following the instructions I could successfully compile and run most of the example projects that come with v 0.9.

My project uses ofxTween and a couple of other addons.
Seems emmake does not like this addon and it complains on missing file such as:
fatal error: 'Poco/Delegate.h' file not found #include<Poco/Delegate.h>

The project successfully builds on v0.9 in xcode.

Any step I am missing before running
emmake make?
In general, for addons do I need to check something specfic so that they are emscripten compatible. I am quite new to emscripten but pretty excited for the fact that we can now create projects that can also run on the web.

Many thanks

Further updates … I just tried building the project using regular make other than the from xcode and it seems to compile. I am guessing this means the link and include libraries are ok from the makefile perspective.

So I am wondering if emmake make does not use the same include and library paths.


poco is not used in the emscripten version so anything that uses poco won’t work there

Many thanks Arturo.
I will try to remove the dependency on this and see if it works.
In general, if I have to make any additional link/build settings (such as linking with additional lib) for emscripten, is there a specific place I should look at?

I ran into another issue while trying to use the awesome ofxLibwebsocket with emscripten. Works like a charm on of_8.1 with xcode build, but some openssl compilation error with emscripten.

Gracias again

Hi Arturo,

Another hiccup… was trying to add ofxVectorGraphics addon to a simple test project and saw this error when building with emmake make:

of_v0.9.0_osx_release/addons/ofxVectorGraphics/src/ofxVectorGraphics.cpp:317:6: error: use of undeclared identifier 'glVertex2f' glVertex2f(x + xpos, y + ypos);

I got the same error while trying to build the vectorGrahicsExample project.

Any pointers will be a great help.


yes that addon is really old and although we keep it around for compatibility is mostly deprecated. those calls glVertex2f belong to openGL immediate mode which is not supported by web gl.

also any addon that has binary libraries won’t work right away you’ll need to compile them first for emscripten to be able to use the addon.

network is also a special case. that addon you point out is a simulation of websockets on top of normal posix or windows sockets but the browser already has websockets so it doesn’t make much sense, you’ll need to use c++ -> javascript calls in order to use websockets.

in general take a look at the emscripten docs and if some gl function fails at the opengl ES or web gl specification to see if it’s supported

1 Like