mitsuba-renderer / mitsuba

Mitsuba renderer main repository
GNU General Public License v3.0
1.05k stars 321 forks source link

Compiler Error with vs2017 #42

Open elegabriel opened 7 years ago

elegabriel commented 7 years ago

Hello, I tried to complie Mitsuba using vs2017, but got 2 errors when it came to "simply run scons" step.

Severity    Code    Description Project File    Line    Suppression State
Error   C2248   'ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element<U1>': cannot access private struct declared in class 'ply::ply_parser::scalar_property_definition_callbacks_type'    mitsuba-vs2017  G:\Document\Git\mitsuba\dependencies\include\boost\mpl\aux_\preprocessed\plain\inherit.hpp  22  

Severity    Code    Description Project File    Line    Suppression State
Error   C2248   'ply::ply_parser::scalar_property_definition_callbacks_type::callbacks_element<U1>': cannot access private struct declared in class 'ply::ply_parser::scalar_property_definition_callbacks_type'    mitsuba-vs2017  G:\Document\Git\mitsuba\dependencies\include\boost\mpl\aux_\preprocessed\plain\inherit.hpp  22  

I changed all private members of 'scalar_property_definition_callbacks_type' and 'list_property_definition_callbacks_type' in ply_parser.hpp into public, making project build succeed, which was quiet ugly. It seems that template class 'inherit2' in file inherit.hpp accesses some private member of the two type above. How can I fix it more correctly?

amyspark commented 7 years ago

It is a bug with VS2017.

elegabriel commented 7 years ago

all right. Thanks!

tuket commented 6 years ago

What is the workaround? in the build directory the aren't conf files for other versions of VS.

tuket commented 6 years ago

Ok, it looks that I just had to update Visual Studio. Then it compiled fine Now it's crashing on start up. image

elegabriel commented 6 years ago

You can find some solutions from this issue. https://github.com/mitsuba-renderer/mitsuba/issues/52#issuecomment-357189129