WILLIAMXXX

Hello,

I make games with directx and visual c++ 2005

I have creating a small game.

as I compiling the game then have I errors:

Error 1 error LNK2019: unresolved external symbol _D3DX10CreateEffectFromFileW@48 referenced in function "long __cdecl InitDevice(void)" ( InitDevice@@YAJXZ) Game3.obj
Error 2 error LNK2019: unresolved external symbol _D3D10CreateDeviceAndSwapChain@32 referenced in function "long __cdecl InitDevice(void)" ( InitDevice@@YAJXZ) Game3.obj
Error 3 fatal error LNK1120: 2 unresolved externals c:\Users\WILLIAM\Documents\My games\Game3\Debug\Game3.exe

What go here wrong

Can you help me

Thanks



Re: Visual C++ General Errors with DirectX in visual c++ 2005

crescens2k

Have you linked against the correct libraries




Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

Yes, I have that.

I have the Directx SDK april 2007.

Yes I include the libary's of the SDK





Re: Visual C++ General Errors with DirectX in visual c++ 2005

crescens2k

Well, either you are not actually linking the project against the export library, or you have more than one DirectX SDK in the search path for the libraries and an older one is being found first.

For example, in this the D3DX10CreateTextureFromFile is missing 2 parameters in the December 2006 version (indicated by it only having @40 in the name) and it didn't have D3DX10CreateDeviceAndSwapChain. So, make sure you are actually linking against d3dx10.lib in Project->Properties->Configuration Properties->Linker->Input->Aditional Dependencies. And make sure there is no other DirectX SDK in your lib path that could be interfering.






Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

No, I have 1 SDK. april 2007 only



Re: Visual C++ General Errors with DirectX in visual c++ 2005

Nishant Sivakumar

What exactly did you do when you say you have included the SDK libs




Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

Yes, i include the sdk libs.



Re: Visual C++ General Errors with DirectX in visual c++ 2005

Nishant Sivakumar

Perhaps I should re-phrase my question. What I'd like to know is what you meant by "I include the libs". Do you add them to the additional linker modules




Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

This picture:





Re: Visual C++ General Errors with DirectX in visual c++ 2005

Nishant Sivakumar

Ok, that's what I thought. Just setting that path won't do, you also need to specify the additional lib files in Project properties / Linker / Input / Additional Dependencies box.





Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

In tath textbox is the text all d3d10.lib and d3dx10.lib

Its do not work





Re: Visual C++ General Errors with DirectX in visual c++ 2005

Nishant Sivakumar

Then perhaps you need to remove the 64-bit lib path from the list of directories. Perhaps it's getting the wrong libs because of the directory search order.





Re: Visual C++ General Errors with DirectX in visual c++ 2005

WILLIAMXXX

Yes that work good!!!

I thanx you