I'm having a bit of trouble trying to create a small VEX library for myself, but somehow I can't manage to make it work, I'm hoping someone here can shed a bit of light in the matter.
Basically, any time I try to include any custom file on a wrangle node in Houdini I get this error:
Error: The sub-network output operator failed to cook: /obj/geo1/attribwrangle1/attribvop1 Warning: Errors or warnings encountered during VEX compile: C:/Users/Supervisor/Documents/houdini15.5/vex/include/a_test.h: Multiple definitions of function: int my_test_func() (1,14:25). Errors or warnings encountered during VEX compile: C:/Users/Supervisor/Documents/houdini15.5/vex/include/a_test.h: Multiple definitions of function: int my_test_func() (1,14:25). Error: Vex error: C:/Users/Supervisor/Documents/houdini15.5/vex/include/a_test.h: Multiple definitions of function: int my_test_func() (1,14:25) Failed to resolve VEX code op:/obj/geo1/attribwrangle1/attribvop1Unable to load shader 'op:/obj/geo1/attribwrangle1/attribvop1'.
I run Houdini with a different set of environment variables per-project, so I though maybe it was some “HOUDINI_VEX_PATH” or “HOUDINI_PATH” that I forgot to prepend the default environment (&), but I've attempted to do the same with the default Houdini paths and still fails to do such.
To test, I've created a file in CUsers/Supervisor/Documents/houdini15.5/vex/include/a_test.h with this code:
function int my_test_func() { return 1; }
Then in Houdini a simple sphere, a Point Wrangle with the following code:
# include <a_test.h> i@foo = my_test_func();
I'm not sure what I'm doing wrong, I've even tried to put that same file in $HH/vex/include but it yields the same error.
I'm using Houdini FX 15.5.523 (apprentice) under Windows, I've also attached the full info in the post.
Any ideas?
Thanks.