Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
I am trying to build from scratch and msvc reported an error when building ImfAttribute.cpp that error C2039: 'binary_function': is not a member of 'std'. @zhiyi1801 cross examined with me and his code using msvc 14.29 is fine. Later I found out that I need to add #include <functional> explicitly in ImfAttribute.cpp to compile successfully. In @zhiyi1801's case class binary_function is defined in xstdef.h.
Tested on Windows 10 | MSVC 14.37.32822 | Visual Studio 2022 | CMake 3.27
I am trying to build from scratch and msvc reported an error when building
ImfAttribute.cpp
thaterror C2039: 'binary_function': is not a member of 'std'
. @zhiyi1801 cross examined with me and his code using msvc 14.29 is fine. Later I found out that I need to add#include <functional>
explicitly inImfAttribute.cpp
to compile successfully. In @zhiyi1801's case classbinary_function
is defined inxstdef.h
.Tested on Windows 10 | MSVC 14.37.32822 | Visual Studio 2022 | CMake 3.27