Directxmath.h does not seem to contain xmmatrix
Answered
So I am making an application with directx in c++ and I should be using xmmatrix for a couple of formulas. But for some reason its not included in the header file that it should be in according to the microsoft docs (https://learn.microsoft.com/en-us/windows/win32/api/directxmath/ns-directxmath-xmmatrix)
How do I fix this/why is it not in the version of the file used by clion by default?
Please sign in to leave a comment.
This is not a question about CLion.
Oh my bad, where should I have asked this question?
I thought it belonged here as clion installs with its own version of the file that it checks first.
It does? That's news to me. Why would it install Microsoft SDK include files?
C:\Users\USERNAME\AppData\Local\Programs\CLion\bin\mingw\x86_64-w64-mingw32\include if you used the default install directory. This is also the version of the file it will include if you use #include <directxmath.h> (right click, go to definition, right click, open in file explorer)
Well I’m wrong then, it is a relevant question.
I would never even contemplate using that toolchain to write stuff. I would always use the MSVC toolchain and the Windows SDK, installed manually beforehand.
Tjalle, CLion on Windows bundles only the MinGW toolchain. While, as you yourself mentioned, XMMATRIX is from the Microsoft Windows SDK's directxmath header, not the MinGW's minimal default header. So if you want to use XMMATRIX, you need to configure the MSVC toolchain in CLion (https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html#MSVC).
ah, thanks