HDK multy-file compilation

   4109   5   0
User Avatar
Member
128 posts
Joined: July 2005
Offline
We found, that commenting some lines in GB_GenericData.h (or just including once them in source code - if we need it) allows us to build and link dso file located in different .cpp/.o files, is it possible to alter HDK in such manner by SESI?
It dramatically reduces compilation time and debugging.

Thank you!
Anything that flies
User Avatar
Member
7743 posts
Joined: July 2005
Offline
I'm not sure I understand you. It has always been possible to compile HDK plugins consisting of multiple files when using Makefiles?

http://www.sidefx.com/docs/hdk11.0/hdk_intro_compiling.html#HDK_Intro_Compiling_Makefiles [sidefx.com]
User Avatar
Member
128 posts
Joined: July 2005
Offline
Ooops Sorry
We mean windows developement with MSVC2005SP1.
GB_GenericData.h defines some static templated functions. Since all cpp files includes GB_GenericData.h - we have multiple definitions, which are unacceptable for linker. Turning linker with /FORCE:MULTIPLE is not a solution, since plug-in does not work, being built with this flag.
We compiled and linked our plug-in for Linux64 - and we have no any problems, so, we beleive you, that makefile you provided is valid. May be it is just windows trouble.

Thank you!

Another issue, which make us insane sometime - all our plug-ins say about inconsistent linkage during mplay/mview starting, during reloading geometry, stored at obj-file by SOP File, and sometime else.

Message looks like (for SOP nodes)

Houdini DSO - error on ‘/home/joemi/houdini11.0/dso/somedso.so’
/home/joemi/houdini11.0/dso/somedso.so: undefined symbol: _ZN8SOP_Node17getVariableStringEiR9UT_Stringi

or (for DOP-nodes)

Houdini DSO - error on ‘/home/joemi/houdini11.0/dso/somedso.so’
/home/joemi/houdini11.0/dso/somedso.so: undefined symbol: _ZN8SIM_Data18initializeSubclassE

everything works fine, but we don't know what to do with this message, sometime it produced very large logs. What we have to do to eliminate such trouble?

Thank you!
Anything that flies
User Avatar
Member
7743 posts
Joined: July 2005
Offline
It's probably a bug that the -DNEED_SPECIALIZATION_STORAGE option needs to be supplied to the compiler which is missing from hcustom/Makefile.win. If this fixes your problem, please log a bug [sidefx.com] for this.

As for your other errors, try recompiling those .so's using the exact HDK that matches the version of Houdini which you are using.
User Avatar
Member
128 posts
Joined: July 2005
Offline
1. We just alter some HDK source, as we know about more simple solution - we will try, thank you!
2. we solved that troubles with explicit linkage of HDK's lib-files,
makefiles you provided suppress this.

Thank you!
Anything that flies
User Avatar
Member
7743 posts
Joined: July 2005
Offline
Try the latest daily build, I think some things were fixed there that should help.
  • Quick Links