VS settings for the DirectXMath library

First, in order to use the DirectXMath library, we need to add header files to the code:
#include <DirectXMath.h> #include <DirectXPackedVector.h>

Next, we also need to enable the SSE2 instruction set/arch:SSE2 for the x86 platform.
Project Properties -> Configuration Properties -> C/C++ -> Code Generation -> Enable Enhanced Instructon Set.
Enable SSE2 instruction setFor the x64 platform, it is not necessary to enable the SSE2 instruction set, because all x64CPUs support it.

Finally for all platforms the fast floating point model /fp:fast needs to be enabled.
Project Properties -> Configuration Properties -> C/C++ -> Code Generation -> Floating Point Model.
Enable fast floating point model
The configuration is now complete.
complete result

Guess you like

Origin blog.csdn.net/weixin_47819574/article/details/126726591