-
I built OpenVDB by these instructions: https://github.com/AcademySoftwareFoundation/openvdb#windows Then I'm using OpenVDB in my code. My include_directories("C:/Program Files (x86)/OpenVDB/include") But, when building my code, I'm receiving such errors:
VersionsI have used different OpenVDB tags, all of them throw the same error: git checkout v8.2.0
git checkout v8.1.0
git checkout v7.2.3 ToolchainsI have used both Visual Studio 2017 and 2019 toolchains. But they both throw the same errors. CauseIt looks like a compiler related error. But I ran out of options to solve it. Could anyone help? Some months ago, I was building the same code just fine 😕 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Windows is most likely redefining min/max functions as macros which causes this. OpenVDB tells windows not to define these in two places; the first is in
works:
doesn't work:
|
Beta Was this translation helpful? Give feedback.
Windows is most likely redefining min/max functions as macros which causes this. OpenVDB tells windows not to define these in two places; the first is in
Platform.h
whichBBox.h
includes. The second is in the distributed CMake modules which it doesn't seem like you're using. There are two solutions:#define NOMINMAX
before you include windows system headers. For example:works:
doesn't work: