Open JamarleyHub opened 4 months ago
So after a bit of fiddling I finally got the project to build: First obviously you need to include
#include <cstdint>
in both ImfDwaCompressor.cpp and ImfMisc.cpp
Next you need to remove line 319 in rapidjson/document.h It looks like this:
GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
It's just an assignment operator anyway, no harm in removing it.
For that (if you have followed the steps on the website) you need to open the file
./DJV-Release/DJV-install-Release/include/rapidjson/document.h
After that you still get two more errors to fix, saying that
./DJV-install-Release/include/rapidjson/document.h:885:83: error: macro "RAPIDJSON_ENABLEIF" passed 2 arguments, but takes just 1
885 | explicit GenericValue( T b, RAPIDJSON_ENABLEIF( internal::IsSame<bool, T> ) )
and
./DJV-install-Release/include/rapidjson/document.h:892:75: error: macro "RAPIDJSON_STATIC_ASSERT" passed 2 arguments, but takes just 1
892 | RAPIDJSON_STATIC_ASSERT( internal::IsSame<bool, T>::Value );
To fix those errors you need to go into line 885 and 892 of the same documents.h respectively and set a few parentheses like so:
// Old line 885:
// explicit GenericValue( T b, RAPIDJSON_ENABLEIF( internal::IsSame<bool, T> ) )
// Fixed line:
explicit GenericValue( T b, RAPIDJSON_ENABLEIF( (internal::IsSame<bool, T>) ) )
// ...
// Old line 892:
// RAPIDJSON_STATIC_ASSERT( internal::IsSame<bool, T>::Value );
// Fixed line:
RAPIDJSON_STATIC_ASSERT( (internal::IsSame<bool, T>::Value) );
Save and exit the file. The project should now compile and run properly.
I've tried to build the project from 3 different sources and it does not seem to work. First I had to add
to both ./OpenEXR/src/OpenEXR/OpenEXR/IlmImf/ImfDwaCompressor.cpp and ./OpenEXR/src/OpenEXR/OpenEXR/IlmImf/ImfMisc.cpp
due to errors:
and
And after that it spits out an error regarding RapidJSON:
I presume the build problems are not fixable on your end, since they are third party libraries, right? I found that the bug regarding the assignment has been fixed so maybe this just needs to be updated on your end?