KhronosGroup / OpenCOLLADA

654 stars 252 forks source link

ColladaMax 3ds Max 2020 compilation error in COLLADAMaxSceneGraphCreator.cpp #627

Open ragerma opened 4 years ago

ragerma commented 4 years ago

I'm trying to compile the ColladaMax plugin with 3ds Max 2020 SDK and Visual Studio 2017. Got stuck with the following compilation error in COLLADAMaxSceneGraphCreator.cpp. Does anyone know how to fix it?

1>COLLADAMaxSceneGraphCreator.cpp 1>c:\opencollada-master2020\colladamax\src\colladamaxscenegraphcreator.cpp(206): fatal error C1001: An internal error has occurred in the compiler. 1>(compiler file 'd:\agent_work\3\s\src\vctools\compiler\cxxfe\sl\p1\c\ctrlflow.c', line 550) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1>Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information 1>c:\opencollada-master2020\colladamax\src\colladamaxscenegraphcreator.cpp(229): note: see reference to function template instantiation 'bool COLLADAMax::SceneGraphCreator::importInstances<COLLADAFW::InstanceCamera,0>(const COLLADAFW::PointerArray &,ImpNode *)' being compiled 1>COLLADAMaxSkinControllerDataImporter.cpp

ragerma commented 4 years ago

It looks like a compatibility issue with Visual Studio 2017. I tried compiling on Visual Studio 2015 and did not get this error. The error is caused by the following line of code. I don't know how to rewrite it to make it compile in VS2017.

                    // post process the creation
        if ( postProcess )
            (this->*postProcess)(newNode, instance);
ragerma commented 4 years ago

I tried compiling on Visual Studio 2019 and got the same issue. Apart from that, there are two more compile errors. One is “ConvertUTF.h”: No such file or directory. Another is in itoaUnitTest.cpp(26,37): error C2275: “IntegerType”: illegal usage.

bornright commented 4 years ago

I am so sorry that my response won't be helpful, but I do want you to know that I am cheering you on! I cannot understand why this tool doesn't have more support. I guess everyone is busy?

I hope you're able to figure out how to bring this exporter back to the Max community. I don't know if this violates GitHub's rules or not, but if you have a "donate" button somewhere on the web...

renjianqiang commented 4 years ago

this is a template parameters error, the vs2017 and later compiler may improve some implementation via c++ specification(The closest implementation is g++). so when template expansion, postProcess may not implicit convert to bool, so this error occurred. you just need modify the code like this:

if (postProcess != 0)
RemiArnaud commented 4 years ago

See https://github.com/RemiArnaud/OpenCOLLADA/commit/131338fc3c0b6f2d2461777f874d3a2c54c0cbee

Binaries available https://github.com/RemiArnaud/OpenCOLLADA/releases/tag/v1.6.70-max