[2.1] Compiler crashes on MSVC 2019
Posted: Sun May 26, 2019 6:32 pm
I'm just posting this here in case someone else has a similar issue. When attempting to build Ogre on Visual Studio 2019 16.1.1 I am getting errors such as:
It seems to happen after encountering type conversion warnings. Searching for similar errors on the web I found similar reports of crashing when the compiler find things such as the returned type not being exactly the same as the type in the function declaration.
Anyways, the solution was to install Visual Studio 2017 and it's now building everything.
Code: Select all
1> INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX64\x64\CL.exe'
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:\Users\xissb\Documents\Ogre\OgreMain\src\OgreItem.cpp(275,51): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreItem.cpp(275,51): warning C4267: cl : Command line error D8040 : error creating or communicating with child process
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
1> Done executing task "CL" -- FAILED.
Code: Select all
C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMeshManager.cpp(1040,59): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMeshManager.cpp(1056,123): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMeshManager.cpp(1075,87): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMesh2.cpp(546,56): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMesh.cpp(1127,66): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMesh.cpp(1132,88): warning C4267: 'argument': conversion from 'size_t' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMesh.cpp(1410,45): warning C4244: 'initializing': conversion from '__int64' to 'unsigned short', possible loss of data
1> C:\Users\xissb\Documents\Ogre\OgreMain\src\OgreMesh.cpp(1410,45): warning C4244: cl : Command line error D8040 : error creating or communicating with child process
1> C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429,5): error MSB6006: "CL.exe" exited with code 2.
1> Done executing task "CL" -- FAILED.
Anyways, the solution was to install Visual Studio 2017 and it's now building everything.