問題描述
錯誤 LNK2019 Directx10 VC++2010 (Error LNK2019 Directx10 VC++2010)
I am trying to learn about DirectX 2010, after setting up the Libraries how i installed the Libraries:‑ VC++ 2010‑View‑other windows‑Property manager
i opened the Microsoft.Cpp.Win32.user VC++ Directories :‑ Include Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include Library Directories: C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x64
here is the Error list i get:‑ Error 1 error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW@48 referenced in function "long __cdecl InitDevice(void)" (?InitDevice@@YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab Error 2 error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "long __cdecl InitDevice(void)" (?InitDevice@@YAJXZ) c:\Users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\CodeName_Yarab\Main.obj CodeName_Yarab Error 3 error LNK1120: 2 unresolved externals c:\users\ahmed_saad\documents\visual studio 2010\Projects\CodeName_Yarab\Debug\CodeName_Yarab.exe 1 1 CodeName_Yarab
i am using Windows 8 pro x64
‑‑‑‑‑
參考解法
方法 1:
It might be that you'll need to link to a .lib‑file, because DX ist not among the usual libraries. Look for a .lib file and add it to your Linker properties.
(by Ahmed Saad、bash.d)