Visual Studio 2003 and directx problem

Started by
3 comments, last by Illco 18 years, 10 months ago
Hi i am rewriting my wrapper classes for directx in visual studio 2003.net and when i compile this is the error i get ( at Direct3DCreate9(D3D_SDK_VERSION)) Zarcanoid error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: __thiscall ZD3D::ZD3D(void)" (??0ZD3D@@QAE@XZ) Zarcanoid fatal error LNK1120: 1 unresolved externals I got this error before and i solved it by installing some directx sample and than deleting all files except project files.Then i created my files and everything was going fine. So can somebody tell how to setup project options or whatever i need. Thanks, Zlatko
Serbia,Zrenjanin
Advertisement
You need to link in the libraries that come with DirectX, which is probably done in the sample's project files already. Go into the Project Options menu and see where you can add libraries. Add the DX libraries there.

Greetz,

Illco
i didnt find in project options VC++ directories but in tools->projects and there are directX include and library directories

Is there maybe something other that i need to link to?

EDIT:: i found additional dependencies in project options
is that what i was looking and if yes whit what to link

this its state

comctl32.lib dxerr9.lib d3dx9d.lib winmm.lib dsound.lib dxguid.lib odbc32.lib odbccp32.lib
Serbia,Zrenjanin
Thx illco i added the d3d9.lib and it works now.
Its strange that d3d9.lib is not standard include :(
Serbia,Zrenjanin
Great. The menu title differed because I'm not using VS 2005 but VS 6.0 (98). It is not so strange the library is not included by default. You can do many different projects with VS and not all of them require the library. If regarding professional use of VS, very few projects actually need it.

Greetz,

Illco

This topic is closed to new replies.

Advertisement