0

I've cloned the pbrt-v3 repository using Visual Studio 2017. I've tried to compile a project where I included the Transform.h, but I'm getting the following error from the linker:

LNK2019 unresolved external symbol "int __cdecl Imf::globalThreadCount(void)" (?globalThreadCount@Imf@@YAHXZ) referenced in function "class pbrt::RGBSpectrum * __cdecl pbrt::ReadImageEXR(class std::basic_string,class std::allocator > const &,int *,int *,class pbrt::Bounds2 *,class pbrt::Bounds2 *)" (?ReadImageEXR@pbrt@@YAPEAVRGBSpectrum@1@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEAH1PEAV?$Bounds2@H@1@2@Z)

I've compiled and installed openexr using CMake for Visual Studio. I've added

libpbrt.lib libglog_static.lib IlmThread-2_2.lib Half.lib Iex-2_2.lib IexMath-2_2.lib Imath-2_2.lib

as additional dependencies in the project settings. I wasn't able to figure out in which library globalThreadCount is defined. So, which library am I missing?

0xbadf00d
  • 17,405
  • 15
  • 67
  • 107
  • The `globalThreadCount` comes from ilmimf (https://android.googlesource.com/platform/external/free-image/+/71163caf89862f79f6419077cf6f0b18b7725d52/Source/OpenEXR/IlmImf/ImfThreading.h) . – Rudolfs Bundulis Jul 24 '19 at 08:17
  • @RudolfsBundulis So, shouldn't IlmThread-2_2.lib be the right library? – 0xbadf00d Jul 24 '19 at 08:25

0 Answers0