当我使用 DirectMath 的 XM_CALLCONV 时,是否必须同时编写声明和定义?

When I use XM_CALLCONV of DirectMath, Do I have to write that both declarations and definitions?

// declaration in header file
void XM_CALLCONV F(FXMVECTOR vec);

// definition in source file
void XM_CALLCONV F(FXMVECTOR vec) { ... }

我必须写 XM_CALLCONV 两个吗?或者只在声明时写一次?

https://docs.microsoft.com/en-us/cpp/cpp/vectorcall?view=msvc-160

我明白了。在编译器中,声明时写一次即可。