Skip to content

error C2059: syntax error: ')' #1302

Answered by Idclip
Megidd asked this question in Q&A
Discussion options

You must be logged in to vote

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 which BBox.h includes. The second is in the distributed CMake modules which it doesn't seem like you're using. There are two solutions:

  1. Use the installed CMake modules. see: https://www.openvdb.org/documentation/doxygen/build.html#buildUsingOpenVDB
  2. Make sure you include VDB headers first OR #define NOMINMAX before you include windows system headers. For example:

works:

#include <openvdb.h> // defines platform requirements needed for VDB to build
#include <windows.h> 

doesn't work:

#include <windows.h> // could also be indir…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Megidd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants