Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

DannyRoweWSM

Direct3DCreate8

This topic is 5733 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have recently installed the DirectX 9 SDK and have begun developing my game. When i began the project I insured that all the DirectX libraries and include files were included as necessary. I have a function with the following code: //--------------------------- // Name: CreateD3DObject // Desc: Creates a D3D object //--------------------------- HRESULT CDirect3D::CreateD3DObject() { // Create a D3D object m_pDirect3D = Direct3DCreate9(D3D_SDK_VERSION); if(m_pDirect3D == NULL) { MessageBeep(MB_OK); MessageBox(m_hWnd, "Failed to create a D3D object.", "Initialisation Error", MB_OK | MB_ICONERROR); return E_FAIL; } return D3D_OK; } But for inexplicable reason I get the following error: FlightSim error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "private: long __thiscall CDirect3D::CreateD3DObject(void)" (?CreateD3DObject@CDirect3D@@AAEJXZ) I dont get any link errors from any other functions concerning DirectX and when i attempt to open the d3d9.h file in the visual studio.net ide the file loads up as expected. Plz help as i am clueless. Thanks Danny

Share this post


Link to post
Share on other sites
Advertisement
Lol you are actually trying to create a D3D 9 object, see your code above!

change the 9 to an 8.

[edited by - superdeveloper on April 1, 2003 12:31:24 PM]

Share this post


Link to post
Share on other sites
Sorry your header title is "Direct3DCreate8" is this what you meant, or you meant "Direct3DCreate9"?

re-check that d3d9.lib is acutally in the linker input files list...

www.cppnow.com

Share this post


Link to post
Share on other sites
Thanks. Yeah i had included the library directory but forgot to manually type the d3d9.lib in the linker input list. How stupid. Thanks for your help.

Danny

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!