[SOLVED] Unable to use ofxVoronoi addon

I have a problem using this ofxVoronoi addon with OF 0.8.4. on Windows 8 64-bit using Code::Blocks 13:12. The build errors I initially get are undefined references, most likely because the ProjectGenerator does not generate a correct project.

In this GitHub issue I have tried working towards a solution together with the addon creator. Unfortunately, 14 comments, many attemps and almost 2 months later, I am still unable to run this addon… :weary:

Please help! :smiley:

So, the original error messages are:

obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::container_2d::container_2d(double, double, double, double, int, int, bool, bool, int)'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::voronoicell_base_2d::voronoicell_base_2d()'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::container_2d::put(int, double, double)'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `bool voro::voro_compute_2d<voro::container_2d>::compute_cell<voro::voronoicell_2d>(voro::voronoicell_2d&, int, int, int, int)'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::container_base_2d::~container_base_2d()'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::voronoicell_base_2d::~voronoicell_base_2d()'|
obj\Release\addons\ofxVoronoi\src\ofxVoronoi.o:ofxVoronoi.cpp|| undefined reference to `voro::voronoicell_base_2d::~voronoicell_base_2d()'|

When adding the source file to the codeblocks’ workspace, either manually or via the addon_config.mk, I end up with the following error message:

obj\Release\addons\ofxVoronoi\libs\Voro++2D\libvoro++_2d32.o||No such file or directory

Another error message I got through other tries was:

c:\coding\codeblocks\mingw\bin..\lib\gcc\mingw32\4.7.1........\mingw32\bin\ld.exe:..\libs\Voro++2D\libvoro++_2d32.a|1|syntax error|

My goal is not so much to make this work for myself only, but rather to change the addon on GitHub so that it can be used cross-platform and I can use/recommend the addon in some open source OF code examples.

Hey @amnon,

I have a fork of ofxVoronoi here https://github.com/trentbrooks/ofxVoronoi which works on Windows 7 + 8. My version is pretty much the same as the others floating around, except it includes the non-compiled source code for Voro++2D (which took me ages to track down- i got the source from the original Voro++ author Eric Rycroft). Should work with the project generator on any platform. Let me know if it doesn’t work for you? Good luck.

Thanks @trentbrooks!

Tried your version and it indeed it runs. Very promising. When I have some time, I’ll try to use it to make Matthias’ version run as well, since his addon has some extended functionality (access to the voronoi cells) I need for my code examples.

All right, very good news. :smile: I used the non-compiled source code from Trent’s repo in Matthias’ version and it finally worked. Thanks so much @trentbrooks. I have sent a pull request to Matthias to implement this solution in his addon. Now this addon can be used cross-platform and I can actually focus again on the voronoi example I was originally trying to make / port.

I guess for me this was a good introduction to the “good, bad and ugly” of ofxAddons… :no_mouth:

2 Likes