HAPI_Initialize exiting without error

   908   2   1
User Avatar
Member
2 posts
Joined: Oct. 2017
Offline
Hello,
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
&cookOptions,
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!

Gautier
User Avatar
Staff
241 posts
Joined: Sept. 2016
Online
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
Member
2 posts
Joined: Oct. 2017
Offline
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