Hi, i was just about to compile a DX9 project after I had reinstalled window7. I'm not a beginner (reading gameprogremming in school) but a got a problem that i just can't understand...
When i try to comple the DX9 proj. visual studio complains about Unresolved external symbols, all of them are D3DX calls. Look at the code that includes the libs, it's correct because it have been working before:
#include "d3d9.h"
#include "d3dx9.h"
#ifdef _DEBUG
# pragma comment(lib, "d3dx9d.lib")
#else
# pragma comment(lib, "d3dx9.lib")
#endif
#pragma comment(lib, "d3d9.lib")
Error:
Error 1 error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: bool __thiscall GraphicsImp::initGraphics(int,int,bool,bool,float,bool)" (?initGraphics@GraphicsImp@@QAE_NHH_N0M0@Z) Graphics.obj
Error 2 error LNK2019: unresolved external symbol _D3DXCreateEffectFromFileA@32 referenced in function "public: bool __thiscall GraphicsImp::initShader(void)" (?initShader@GraphicsImp@@QAE_NXZ) Graphics.obj
Error 3 error LNK2019: unresolved external symbol _D3DXMatrixMultiply@12 referenced in function "public: struct D3DXMATRIX __thiscall D3DXMATRIX::operator*(struct D3DXMATRIX const &)const " (??DD3DXMATRIX@@QBE?AU0@ABU0@@Z) Graphics.obj
Error 4 error LNK2019: unresolved external symbol _D3DXMatrixLookAtLH@16 referenced in function "private: void __thiscall GraphicsImp::configCamera(void)" (?configCamera@GraphicsImp@@AAEXXZ) Graphics.obj
Error 5 error LNK2001: unresolved external symbol _D3DXMatrixLookAtLH@16 Camera.obj
Error 6 error LNK2019: unresolved external symbol _D3DXMatrixPerspectiveFovLH@20 referenced in function "private: void __thiscall GraphicsImp::configProjection(void)" (?configProjection@GraphicsImp@@AAEXXZ) Graphics.obj
Error 7 error LNK2019: unresolved external symbol _D3DXMatrixTranslation@16 referenced in function "private: void __thiscall GraphicsImp::configStdPresentValues(void)" (?configStdPresentValues@GraphicsImp@@AAEXXZ) Graphics.obj
Error 8 error LNK2019: unresolved external symbol _D3DXMatrixScaling@16 referenced in function "private: void __thiscall GraphicsImp::configStdPresentValues(void)" (?configStdPresentValues@GraphicsImp@@AAEXXZ) Graphics.obj
Error 9 error LNK2019: unresolved external symbol _D3DXMatrixRotationY@8 referenced in function "private: void __thiscall GraphicsImp::configStdPresentValues(void)" (?configStdPresentValues@GraphicsImp@@AAEXXZ) Graphics.obj
Error 10 error LNK2019: unresolved external symbol _D3DXMatrixRotationX@8 referenced in function "private: void __thiscall GraphicsImp::configStdPresentValues(void)" (?configStdPresentValues@GraphicsImp@@AAEXXZ) Graphics.obj
Error 11 error LNK2019: unresolved external symbol _D3DXCreateFontA@48 referenced in function "private: void __thiscall GraphicsImp::configFpsCounter(void)" (?configFpsCounter@GraphicsImp@@AAEXXZ) Graphics.obj
Error 12 error LNK2019: unresolved external symbol _D3DXMatrixRotationZ@8 referenced in function "public: void __thiscall GraphicsImp::renderObjects(class std::list<class Entity *,class std::allocator<
class Entity *> >)" (?renderObjects@GraphicsImp@@QAEXV?$list@PAVEntity@@V?$allocator@PAVEntity@@@std@@@std@@@Z) Graphics.obj
Error 13 error LNK2019: unresolved external symbol _D3DXCreateTextureFromFileA@12 referenced in function "public: bool __thiscall GraphicsImp::setBackground(class std::basic_string<
char,struct std::char_traits<char>,class std::allocator<char> >)" (?setBackground@GraphicsImp@@QAE_NV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) Graphics.obj
Error 14 error LNK2019: unresolved external symbol _D3DXVec2Normalize@8 referenced in function "public: void __thiscall Entity::tractor(class Entity *)" (?tractor@Entity@@QAEXPAV1@@Z) Entity.obj
Error 15 error LNK2001: unresolved external symbol _D3DXVec2Normalize@8 Ship.obj
Error 16 fatal error LNK1120: 13 unresolved externals
I know that this problem is caused be the linker, when it can't link a function call to it's defenition. But I got all the DX9 lib files included in VC++ Direcories, i even placed the required lib files inside the proj. folder...
What have a missed?
Thanks in advanced!