Search form

You are here

ARToolkit node github repository (was: How to include an external library creating a custom node)

I'm trying to port ARToolkit in a Vuo node. Quite challenging, I think.
Anyway, I studied the video introduction here on Vuo about creating nodes and succeeded in compiling the examples.
Then, I downloaded ARToolkit SDK and placed in my home path, under /SDKs. There also there's Vuo SDK.
I created a new node cloning an example, so my structure is:
~/SDKs/ARToolKit5-bin-5.3.2r1-OSX
~/SDKs/vuo-1.0.1-sdk

and I'm trying to build the node placed in
~/SDKs/vuo-1.0.1-sdk/example/node/detect

I open the .pro file in QT Creator, choose "Desktop" kit, and add

include <AR/config.h>

to detect.c file.

Building, i get "<AR/config.h> file not found" error.

I tried adding several INCLUDEPATH directive in .pro file, without success, like
INCLUDEPATH += ~/SDKs/ARToolKit5-bin-5.3.2r1-OSX/include

using brackets, absolute paths, using HEADER directive and so on, but I can't make it include the header.

Comments

hm. I upgraded to vuo 1.2.5 to see how Syphon node is implemented, to have a idea of a similar task, and I think this is over my knowledge. The best I can do is spend my 50 credits on that feature request hoping it'll be considered soon.

You'll also need to help vuo-link find the ARToolkit libraries when it links a composition. This means listing the libraries in the dependencies section of your module metadata and either placing them in the Modules folder or passing --library-search-path arguments. See http://api.vuo.org/1.2.5/group__ManagingDependencies.html for instructions.

Oh, and if ARToolkit links to dynamic libraries (which from skimming the documentation I think it does), and if you plan to distribute the node instead of just using it on your own computer, then there's an extra step just because dylibs like to be annoying ;) You have to run a command called install-name-tool on them (which, in the Vuo source code, is done in the file framework.pro). If you need help with that, let me know.

Cool Jaymie, thanks for these clarifications.
I'll go on trying in this challenge, following your suggestion.
I'll report here if I'll have some success and ask again for your kind help if i'll get stuck.
bye
mic

So, what I did is creating a github project, uploading my humble start, open to all contributors here from Vuo community wishing to give some help. It's online at https://github.com/micrem73/VuoARToolkit
I'll keep it updated of any eventual step forward I'd get.

Hi Jaymie,
actually I got the code compile with success.
When I try to run a composition in the vuo editor that uses that node, I get this error:

Node outdated or broken — One or more nodes in this composition can't be used by this version of Vuo. Make sure you're using the latest version of all the extra Vuo nodes you've installed:

I think i missed the step you mentioned:

You'll also need to help vuo-link find the ARToolkit libraries when it links a composition. This means listing the libraries in the dependencies section of your module metadata and either placing them in the Modules folder or passing --library-search-path arguments. See http://api.vuo.org/1.2.5/group__ManagingDependencies.html for instructions.

I read the link provided but I can't sort it out.
Please, what's the way to instruct linker with --library-search-path directive?

If running the composition with Vuo Editor instead of the command-line tools, there isn't currently a way to add a library search path. Instead, you should place the ARToolKit library in the User Modules or System Modules folder.

Notice that the static and dynamic library names leave off the "lib" prefix, and the file extension is optional; libassimp.a becomes assimp or assimp.a, and libicuuc.dylib becomes icuuc or icuuc.dylib.

When i run vuo-link (with --library-search-path ~/SDKs/ARToolKit5-bin-5.3.2r1-OSX/lib option ) i get in console: