Windows HDK project setup

   2439   3   2
User Avatar
Member
2 posts
Joined: March 2017
Offline
Hi,

I'm trying to setup a project on windows using Houdini HDK but I have some difficulties to do it. I use Qt-creator + VS2015 toolchain (from what i read, vc14 has to be used with Houdini 16) and I try to compile a very simple script which use Houdini HDK but it returns several errors (C4430, C2059, C2334 located in the Houdini directory …). My .pro file looks like this :

“TEMPLATE = lib

CONFIG += -std=c++11

HEADERS += \
HoudiniNodeSOP.h

SOURCES += \
HoudiniNodeSOP.cpp

TARGET = HoudiniNodeSOP
DESTDIR = ”D:\Documents\houdini16.5\dso“

DEFINES += \
TP \
nologo \
Zc:forScope \
Zc:rvalueCast \
Zc:strictStrings \
AMD64 \
SIZEOF_VOID_P=8 \
I386 \
WIN32 \
SWAP_BITFIELDS \
_WIN32_WINNT=0x0502 \
NOMINMAX \
STRICT \
WIN32_LEAN_AND_MEAN \
_USE_MATH_DEFINES \
_CRT_SECURE_NO_DEPRECATE \
_CRT_NONSTDC_NO_DEPRECATE \
_SCL_SECURE_NO_WARNINGS \
SESI_LITTLE_ENDIAN \
BOOST_ALL_NO_LIB=1 \
EIGEN_MALLOC_ALREADY_ALIGNED=0 \
FBX_ENABLED=1 \
OPENCL_ENABLED=1 \
OPENVDB_ENABLED=1 \
wd4355 \
w14996 \
O2 \
DNDEBUG \
EHsc \
MD \
GR \
bigobj \
MAKING_DSO \

INCLUDEPATH += ”C:\Program Files\Side Effects Software\Houdini 16.5.473\toolkit\include“ \
”C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include“ \
”C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\ucrt“ \
”C:\Program Files (x86)\Windows Kits\8.1\Include\um“ \
”C:\Program Files (x86)\Windows Kits\8.1\Include\shared“ \

LIBS += -L”CProgram Files (x86)/Microsoft Visual Studio 14.0/VC/lib/amd64“ \
-L”CProgram Files (x86)/Windows Kits/10/Lib/10.0.17134.0/ucrt/x64“ \
-L”CProgram Files (x86)/Windows Kits/8.1/Lib/winv6.3/um/x64“ \
-L”CProgram Files/Side Effects Software/Houdini 16.5.473/custom/houdini/dsolib“ \
”CProgram Files/Side Effects Software/Houdini 16.5.473/custom/houdini/dsolib/*.a“ \
”CProgram Files/Side Effects Software/Houdini 16.5.473/custom/houdini/dsolib/*.lib“

LIBS += -lImath”

I found the DEFINES / LIBS values using hcustom on Houdini command line … Is there something i'm doing wrong ?

Thanks a lot for your help !
User Avatar
Member
1743 posts
Joined: March 2012
Offline
The only safe ways to build HDK plugins are using hcustom, CMake, or Makefiles (if you carefully follow the instructions for Makefiles in the HDK docs). I strongly recommend using hcustom or CMake, because it's significantly easier to set up than trying to mash something together manually that will correctly build against the HDK. I've seen a bunch of Visual Studio projects circulating that don't work 100% correctly, but that look on the surface like they work.

I added another HDK SOP example using CMake a few days ago, (you might need to download a daily build, instead of the production build). It's relatively easy to set up. Just copy the toolkit/samples/SOP/SOP_WindingNumber directory to somewhere outside the Houdini installation directory, make sure to change the CMakeLists.txt file's CMAKE_PREFIX_PATHline to point to the toolkit/cmake directory in the Houdini installation. You can use either the CMake GUI or the command line to build, so if you want to integrate it into QtCreator, you can probably have the command line get run as a custom build operation in QtCreator. You can alternatively have it run hcustom, if the plugin has only one cpp file.

You're correct that Houdini 16.5 HDK plugins require VS2015, specifically Update 3. (Update 2 had a bunch of serious bugs.)
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
2 posts
Joined: March 2017
Offline
Thanks for your quick answer ! I will use CMake instead
User Avatar
Member
1743 posts
Joined: March 2012
Offline
No problem. If you have any questions, feel free to ask. It's unfortunate that there aren't more of our HDK plugin examples ported to CMake yet, but at least there are 2 of them now, (SOP_Star and SOP_WindingNumber).
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
  • Quick Links