Internal Compiler Error when building AGX plugin on VS2017


I observed internal compiler error (C1001) when building
CnoidAGXDynamicsPlugin and

agx version is
Visual Studio 2017 (15.7.4)

This error can be avoided by disabling whole-program-optimization (/GL)
for these projects.

It might be better to disable this option by default.

This may be (just may be) the related info. They (MS-VS developer) says that the problem has been fixed in the very recent version of the Visual C++ compiler, but AGX library may not be compiled using the latest compiler (also, mismatch of the compiler version may lead us to the link-time-optimization error).にてヒルト時に-fatal-error-c1001-て失敗する.html

I agree that disabling the /GL option is a nice solution in this case. It only disables the link-time-optimization while optimization to each modules will still be applied. So the overall performance loss should be very limited.

Information for the other participant who may face with this issue.

Visual C++ whole-program-optimization option is defined in the following line in the choreonoid CMakeList.txt file and can be turned off by using cmake GUI when you generate Visual C++ project file (default value is ON).

Thank you for informing us of this.
I’ll disable this option by default.
Please wait for a while to reflect on the github repository due to circumstances.

I pushed the source code to which this modification was applied.