Linker keeps showing errors after I changed from DirectX SDK to Windows SDK

懵懂的女人 提交于 2019-12-13 06:36:45

问题


I just removed all of the headers that were included in the DirectX SDK and i moved towards the Windows SDK, but once I did, the linker constantly complains about an "unresolved external symbol". The linker shows about 24 errors and most of these errors are about functions that I'm not even using in my game.

Linker errors: error LNK2001: unresolved external symbol "union __m128 __vectorcall DirectX::XMVectorMultiply(union __m128,union __m128)

error LNK2001: unresolved external symbol "union __m128 __vectorcall DirectX::XMVectorSubtract(union __m128,union __m128)

error LNK2001: unresolved external symbol "union __m128 __vectorcall DirectX::XMVector3Normalize(union __m128)

error LNK2001: unresolved external symbol "union __m128 __vectorcall DirectX::XMVectorSet(float,float,float,float)

I have not used XMVector3Normalize(), XMVectorSubtract() and XMVectorMultiply() in my application, but I did use the XMVectorSet().

Most of these functions are part of the DirectXMath.h, so what could be wrong here.

Anyway, I don't know if this will help, but down below are all the headers that i used in my application.

#include <windows.h>
#include <D3D11.h>                      
#include <dinput.h> 
#include <SimpleMath.h>
#include <D3Dcompiler.h>
#include <sstream>
#include <SpriteFont.h>      //This file also includes DirectXMath.h
#include <DDSTextureLoader.h>
#include <WICTextureLoader.h>

#pragma comment (lib, "D3D11.lib")
#pragma comment (lib, "dinput8.lib")
#pragma comment (lib, "dxguid.lib")
#pragma comment (lib, "d3dcompiler.lib")

What can i do to fix these linker problems? I already linked the apropriate libraries and headers using Project->Properties-> VC++ Directories ->Include Directories and Library Directories in Visual Studio 2015.

I've been trying to solve this problem for the past hour or so. Can anyone help me?

来源:https://stackoverflow.com/questions/33714883/linker-keeps-showing-errors-after-i-changed-from-directx-sdk-to-windows-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!