HAPI_Initialize exiting without error

   1025   2   1
User Avatar
2 posts
Joined: Oct. 2017
I am trying an integration of Houdini Engine in my own C++ application.
Basically I linked the libHAPI.a to my visual studio 2015 project, added the include path for HAPI.h, HAPI_Common.h, HAPI_Helpers.h, HAPI_Version.h, and HAPI_API.h and included them, then added all the dlls located in the bin folder of Houdini to the root folder of my application.
When implementing on my application side, everything seems fine as all the functions are recognized and HAPI_CookOptions_Create seems to be working properly. On the other hand, as soon as I call HAPI_Initialize, the process gets killed without any error, just a simple “exit 1”. Has anyone already been through this ? Here is my code :

HAPI_CookOptions cookOptions = HAPI_CookOptions_Create();

HAPI_Session session;
HAPI_CreateInProcessSession( &session );
HAPI_Result res= HAPI_Initialize(
&session, // session
true, // use_cooking_thread
-1, // cooking_thread_stack_size
NULL, // environment files
NULL, // otl_search_path
NULL, // dso_search_path
NULL, // image_dso_search_path
NULL ); // audio_dso_search_path

I am using the latest Houdini 16 version with a 30 days trial licence for Houdini Engine.

Thanks in advance!

User Avatar
275 posts
Joined: Sept. 2016
Hi Gautier,

Did you setup your HFS and PATH environment variable?

Instead of moving all the dlls to your application root, you ‘d rather have the HFS and PATH environnement variable properly setup in your project settings:

HFS should point to houdini’s install folder, and PATH to houdini's bin folder

for example
HFS=C:\Program Files\Side Effects Software\Houdini 16.0.736
PATH=%PATH%;C:\Program Files\Side Effects Software\Houdini 16.0.736\bin

(Replace the above Houdini path with your installation folder.)
User Avatar
2 posts
Joined: Oct. 2017
That was it !
Thank you, by copying all the dll I had some files missing. Setting up the PATH env variable did the job.
  • Quick Links