jrouwe / JoltPhysics

A multi core friendly rigid body physics and collision detection library. Written in C++. Suitable for games and VR applications. Used by Horizon Forbidden West.
MIT License
6.42k stars 414 forks source link

Compile error on Sample project #1068

Closed ChivenZhang closed 4 months ago

ChivenZhang commented 4 months ago

I put the source code on my computer and it compiled failed in the end. This is my cpu info image

This is my compile environment image

This is the compiler (msvc 2022)'s report image

jrouwe commented 4 months ago

It looks like you're using a preview version of MSVC and it has a problem in the header files that ship with it.

I don't support preview versions of MSVC but you can work around this by not making the warnings fatal by setting the cmake option ENABLE_ALL_WARNINGS=NO (or by not using a preview version of MSVC).

ChivenZhang commented 4 months ago

I test sample project on another computer, It compiled successfully with same configuration in vs2022. This is config from vs2022 image This is my another computer's info image

ChivenZhang commented 4 months ago

I have asked my colleague for help, he said my original one not support simd instructions according to compilation error info. image

ChivenZhang commented 4 months ago

It looks like you're using a preview version of MSVC and it has a problem in the header files that ship with it.

I don't support preview versions of MSVC but you can work around this by not making the warnings fatal by setting the cmake option ENABLE_ALL_WARNINGS=NO (or by not using a preview version of MSVC).

ok, I resolved it. Thanks.

jrouwe commented 4 months ago

Note that I reported the issue to Microsoft here