Hydra delegate Linker errors with Houdini on Windows

Hej,

I am trying to compile the Hydra delegate for Houdini 19.5.368 (which uses USD 22.05) and the latest commit on the cycles repo (commit “Fix build with USD 22.05”) on Windows and it compiles fine but then shows linker errors when trying to link the HdCycles.dll

PS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community> cd C:\Users\de8olihe\DEV\github\playground\cycles\
PS C:\Users\de8olihe\DEV\github\playground\cycles> cmake -B ./build -DHOUDINI_ROOT="C:\Program Files\Side Effects Software\Houdini 19.5.368"
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- The C compiler identification is MSVC 19.29.30147.0
-- The CXX compiler identification is MSVC 19.29.30147.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Houdini: C:\Program Files\Side Effects Software\Houdini 19.5.368
-- Found JPEG: C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/jpeg/lib/libjpeg.lib (found version "80")
-- Found TIFF: C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/tiff/lib/libtiff.lib (found version "4.4.0")
-- Found WebP: C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/webp/lib/webp.lib;C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/webp/lib/webpmux.lib;C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/webp/lib/webpdemux.lib
-- Found ZLIB: C:/Users/de8olihe/DEV/github/playground/cycles/../lib/win64_vc15/zlib/lib/libz_st.lib (found version "1.2.13")
-- Found PNG: C:/Users/de8olihe/DEV/github/playground/lib/win64_vc15/png/lib/libpng.lib (found version "1.6.37")
-- Found OptiX: C:/Users/de8olihe/DEV/data/downloads/NVIDIA-OptiX-SDK-7.3.0-win64/include (found suitable version "7.3.0", minimum required is "7.3.0")
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/de8olihe/DEV/github/playground/cycles/build
PS C:\Users\de8olihe\DEV\github\playground\cycles> .\make.bat
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.22621.
-- Found Houdini: C:\Program Files\Side Effects Software\Houdini 19.5.368
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/de8olihe/DEV/github/playground/cycles/build
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Checking Build System
  Generating node_absorption_volume.oso
  Generating node_add_closure.oso
  Generating node_ambient_occlusion.oso

  .......

cycles_hydra.lib(node_util.obj) : error LNK2001: unresolved external symbol "private: static bool pxrInternal_v0_22__pxrReserved__::TfMallocTag::_doTagging" (?_doTagging@TfMallocTag@pxrInternal_v0_22__pxrReserved__@@0_NA) [C:\Users\de8olihe\DEV\gi
thub\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(instancer.obj) : error LNK2001: unresolved external symbol "private: static bool pxrInternal_v0_22__pxrReserved__::TfMallocTag::_doTagging" (?_doTagging@TfMallocTag@pxrInternal_v0_22__pxrReserved__@@0_NA) [C:\Users\de8olihe\DEV\gi
thub\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(mesh.obj) : error LNK2001: unresolved external symbol "private: static bool pxrInternal_v0_22__pxrReserved__::TfMallocTag::_doTagging" (?_doTagging@TfMallocTag@pxrInternal_v0_22__pxrReserved__@@0_NA) [C:\Users\de8olihe\DEV\github\
playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(pointcloud.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::T
f_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens" (?HdPrimTypeTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimTypeTokens_Sta
ticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimTypeTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(volume.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_St
aticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens" (?HdPrimTypeTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimTypeTokens_StaticT
okenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimTypeTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_delegate.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved
__::Tf_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimTypeTokens" (?HdPrimTypeTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimTypeToken
s_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimTypeTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(pointcloud.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Static
DataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdTokens" (?HdTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdTokens_StaticTokenType@pxrInternal_v0_22__pxrReser
ved__@@U?$Tf_StaticDataDefaultFactory@UHdTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
[C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_pass.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_St
aticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal
_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(session.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Static
DataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal_v0_
22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(volume.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_StaticD
ataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal_v0_2
2__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_delegate.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::T
f_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInte
rnal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(curves.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_StaticD
ataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal_v0_2
2__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(material.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Stati
cDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal_v0
_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(mesh.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_StaticDat
aDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdAovTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdAovTokens" (?HdAovTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdAovTokens_StaticTokenType@pxrInternal_v0_22_
_pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdAovTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_delegate.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HgiTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_
StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HgiTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HgiTokens" (?HgiTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHgiTokens_StaticTokenType@pxrInternal_v0_22
__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHgiTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "public: virtual struct pxrInternal_v0_22__pxrReserved__::HdAovDescriptor __cdecl HdCycles::HdCyclesDelega
te::GetDefaultAovDescriptor(class pxrInternal_v0_22__pxrReserved__::TfToken const &)const " (?GetDefaultAovDescriptor@HdCyclesDelegate@HdCycles@@UEBA?AUHdAovDescriptor@pxrInternal_v0_22__pxrReserved__@@AEBVTfToken@4@@Z) [C:\Users\de8olihe\DEV\gith
ub\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(camera.obj) : error LNK2019: unresolved external symbol "public: static double const pxrInternal_v0_22__pxrReserved__::GfCamera::APERTURE_UNIT" (?APERTURE_UNIT@GfCamera@pxrInternal_v0_22__pxrReserved__@@2NB) referenced in function
 "public: __cdecl HdCycles::HdCyclesCamera::HdCyclesCamera(class pxrInternal_v0_22__pxrReserved__::SdfPath const &)" (??0HdCyclesCamera@HdCycles@@QEAA@AEBVSdfPath@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycle
s\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(camera.obj) : error LNK2019: unresolved external symbol "public: static double const pxrInternal_v0_22__pxrReserved__::GfCamera::FOCAL_LENGTH_UNIT" (?FOCAL_LENGTH_UNIT@GfCamera@pxrInternal_v0_22__pxrReserved__@@2NB) referenced in
function "public: __cdecl HdCycles::HdCyclesCamera::HdCyclesCamera(class pxrInternal_v0_22__pxrReserved__::SdfPath const &)" (??0HdCyclesCamera@HdCycles@@QEAA@AEBVSdfPath@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV\github\playgrou
nd\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(camera.obj) : error LNK2019: unresolved external symbol "public: static double const pxrInternal_v0_22__pxrReserved__::GfCamera::DEFAULT_HORIZONTAL_APERTURE" (?DEFAULT_HORIZONTAL_APERTURE@GfCamera@pxrInternal_v0_22__pxrReserved__@
@2NB) referenced in function "public: __cdecl HdCycles::HdCyclesCamera::HdCyclesCamera(class pxrInternal_v0_22__pxrReserved__::SdfPath const &)" (??0HdCyclesCamera@HdCycles@@QEAA@AEBVSdfPath@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe
\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(camera.obj) : error LNK2019: unresolved external symbol "public: static double const pxrInternal_v0_22__pxrReserved__::GfCamera::DEFAULT_VERTICAL_APERTURE" (?DEFAULT_VERTICAL_APERTURE@GfCamera@pxrInternal_v0_22__pxrReserved__@@2NB
) referenced in function "public: __cdecl HdCycles::HdCyclesCamera::HdCyclesCamera(class pxrInternal_v0_22__pxrReserved__::SdfPath const &)" (??0HdCyclesCamera@HdCycles@@QEAA@AEBVSdfPath@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV
\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(camera.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdCameraTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Stat
icDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdCameraTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdCameraTokens" (?HdCameraTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdCameraTokens_StaticTokenType@p
xrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdCameraTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "public: virtual void __cdecl HdCycles::HdCyclesCamera::Sync(class pxrInternal_v0_22_
_pxrReserved__::HdSceneDelegate *,class pxrInternal_v0_22__pxrReserved__::HdRenderParam *,unsigned int *)" (?Sync@HdCyclesCamera@HdCycles@@UEAAXPEAVHdSceneDelegate@pxrInternal_v0_22__pxrReserved__@@PEAVHdRenderParam@4@PEAI@Z) [C:\Users\de8olihe\DE
V\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(curves.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf
_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens" (?HdPrimvarRoleTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimvarRol
eTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimvarRoleTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "private: void __cdecl HdCycles::HdCyclesCurves::Popula
tePrimvars(class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate *)" (?PopulatePrimvars@HdCyclesCurves@HdCycles@@AEAAXPEAVHdSceneDelegate@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCyc
les.vcxproj]
cycles_hydra.lib(mesh.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_S
taticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens" (?HdPrimvarRoleTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimvarRoleT
okens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimvarRoleTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj
]
cycles_hydra.lib(pointcloud.obj) : error LNK2001: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__
::Tf_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdPrimvarRoleTokens" (?HdPrimvarRoleTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdPrimva
rRoleTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdPrimvarRoleTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.v
cxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionSta
rts@?$Sdf_Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_pass.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionStarts
@?$Sdf_Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(session.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionStarts@?$S
df_Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(material.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionStarts@?$
Sdf_Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(mesh.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionStarts@?$Sdf_
Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(pointcloud.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPrimTag,24,8,16384>::_regionStarts" (?_regionStarts@
?$Sdf_Pool@USdf_PathPrimTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionSta
rts@?$Sdf_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(render_pass.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionStarts
@?$Sdf_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(session.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionStarts@?$S
df_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(volume.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionStarts@?$Sd
f_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(output_driver.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionStar
ts@?$Sdf_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(pointcloud.obj) : error LNK2001: unresolved external symbol "private: static char * * pxrInternal_v0_22__pxrReserved__::Sdf_Pool<struct pxrInternal_v0_22__pxrReserved__::Sdf_PathPropTag,24,8,16384>::_regionStarts" (?_regionStarts@
?$Sdf_Pool@USdf_PathPropTag@pxrInternal_v0_22__pxrReserved__@@$0BI@$07$0EAAA@@pxrInternal_v0_22__pxrReserved__@@0PAPEADA) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(field.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdFieldTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Static
DataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdFieldTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdFieldTokens" (?HdFieldTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdFieldTokens_StaticTokenType@pxrInte
rnal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdFieldTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "public: virtual void __cdecl HdCycles::HdCyclesField::Sync(class pxrInternal_v0_22__pxrRese
rved__::HdSceneDelegate *,class pxrInternal_v0_22__pxrReserved__::HdRenderParam *,unsigned int *)" (?Sync@HdCyclesField@HdCycles@@UEAAXPEAVHdSceneDelegate@pxrInternal_v0_22__pxrReserved__@@PEAVHdRenderParam@4@PEAI@Z) [C:\Users\de8olihe\DEV\github\
playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(instancer.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdInstancerTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::T
f_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdInstancerTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdInstancerTokens" (?HdInstancerTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdInstancerTokens
_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdInstancerTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "private: void __cdecl HdCycles::HdCyclesInstancer::SyncPrimvars
(void)" (?SyncPrimvars@HdCyclesInstancer@HdCycles@@AEAAXXZ) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(light.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdLightTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf_Static
DataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdLightTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdLightTokens" (?HdLightTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UHdLightTokens_StaticTokenType@pxrInte
rnal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdLightTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "private: void __cdecl HdCycles::HdCyclesLight::PopulateShaderGraph(class pxrInternal_v0_22_
_pxrReserved__::HdSceneDelegate *)" (?PopulateShaderGraph@HdCyclesLight@HdCycles@@AEAAXPEAVHdSceneDelegate@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(material.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::HdMaterialTerminalTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserve
d__::Tf_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::HdMaterialTerminalTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::HdMaterialTerminalTokens" (?HdMaterialTerminalTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfSt
aticData@UHdMaterialTerminalTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UHdMaterialTerminalTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "private: void __cdecl
HdCycles::HdCyclesMaterial::PopulateShaderGraph(struct pxrInternal_v0_22__pxrReserved__::HdMaterialNetwork2 const &)" (?PopulateShaderGraph@HdCyclesMaterial@HdCycles@@AEAAXAEBUHdMaterialNetwork2@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8o
lihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(mesh.obj) : error LNK2019: unresolved external symbol "class pxrInternal_v0_22__pxrReserved__::TfStaticData<struct pxrInternal_v0_22__pxrReserved__::PxOsdOpenSubdivTokens_StaticTokenType,struct pxrInternal_v0_22__pxrReserved__::Tf
_StaticDataDefaultFactory<struct pxrInternal_v0_22__pxrReserved__::PxOsdOpenSubdivTokens_StaticTokenType> > pxrInternal_v0_22__pxrReserved__::PxOsdOpenSubdivTokens" (?PxOsdOpenSubdivTokens@pxrInternal_v0_22__pxrReserved__@@3V?$TfStaticData@UPxOsdO
penSubdivTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@U?$Tf_StaticDataDefaultFactory@UPxOsdOpenSubdivTokens_StaticTokenType@pxrInternal_v0_22__pxrReserved__@@@2@@1@A) referenced in function "private: void __cdecl HdCycles::HdCyclesMesh
::PopulateTopology(class pxrInternal_v0_22__pxrReserved__::HdSceneDelegate *)" (?PopulateTopology@HdCyclesMesh@HdCycles@@AEAAXPEAVHdSceneDelegate@pxrInternal_v0_22__pxrReserved__@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra
\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglCreateContext referenced in function "private: virtual void __cdecl HdCycles::HdCyclesDisplayDriver::draw(struct ccl::DisplayDriver::Params const &)" (?draw@
HdCyclesDisplayDriver@HdCycles@@EEAAXAEBUParams@DisplayDriver@ccl@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglDeleteContext referenced in function "public: virtual __cdecl HdCycles::HdCyclesDisplayDriver::~HdCyclesDisplayDriver(void)" (??1HdCyclesDisplayDriver@HdCycl
es@@UEAA@XZ) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglGetCurrentContext referenced in function "private: virtual void __cdecl HdCycles::HdCyclesDisplayDriver::draw(struct ccl::DisplayDriver::Params const &)" (?d
raw@HdCyclesDisplayDriver@HdCycles@@EEAAXAEBUParams@DisplayDriver@ccl@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglGetCurrentDC referenced in function "private: virtual void __cdecl HdCycles::HdCyclesDisplayDriver::draw(struct ccl::DisplayDriver::Params const &)" (?draw@H
dCyclesDisplayDriver@HdCycles@@EEAAXAEBUParams@DisplayDriver@ccl@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglMakeCurrent referenced in function "private: void __cdecl HdCycles::HdCyclesDisplayDriver::gl_context_disable(void)" (?gl_context_disable@HdCyclesDisplayDriv
er@HdCycles@@AEAAXXZ) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
cycles_hydra.lib(display_driver.obj) : error LNK2019: unresolved external symbol __imp_wglShareLists referenced in function "private: virtual void __cdecl HdCycles::HdCyclesDisplayDriver::draw(struct ccl::DisplayDriver::Params const &)" (?draw@HdC
yclesDisplayDriver@HdCycles@@EEAAXAEBUParams@DisplayDriver@ccl@@@Z) [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]
C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\Release\hdCycles.dll : fatal error LNK1120: 24 unresolved externals [C:\Users\de8olihe\DEV\github\playground\cycles\build\src\hydra\hdCycles.vcxproj]

The OpenGL linker errors I could fix by adding the opengl32.lib to the Visual Studio solution by hand but the others are persistent.
What am I doing wrong? Unfortunately, I am not that skilled with C++ :frowning: so any pointers or help is welcome.

Thanks,
Oli

I found the issue by myself, guess I am a C++ expert now :smile:

For anyone interested:
In line 127 in src/cmake/external_libs.cmake the directive PXR_STATIC is set. But Houdini isn’t build as static, that’s why the symbols are missing. After commenting out the line, linking works.

Thanks for finding that, I’ll commit a fix to the repository.