Houdini Engine 5.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Compiling Samples

Each sample file is meant to be run as a standalone example file, and should therefore be compiled individually. If using Microsoft Visual Studio, an example compilation method could be as follows:

cl /Zi /EHsc /DEBUG /I "<path to Houdini install location>\toolkit\include" source/materials.cpp "<path to Houdini install location>\custom\houdini\dsolib\libHAPIL.lib"

Make sure you're using the x64 compiler, use of the 32-bit cl.exe will cause "unresolved external symbol" linker errors. To be sure, execute the command above in the x64 Native Tools Command Prompt for VS.

The full code samples and their output, as well as the HDA files used in the samples can be found here.

When running the compiled executable, if you encounter a System Error specifying that the "code execution cannot proceed because libHAPIL.dll was not found", please make sure that the "<path to Houdini install location>\bin" directory has been added to your PATH environment variable.