D3DXGetImageInfoFromFile() produces error LNK2019

Started by
2 comments, last by K1nG Gr4H4m 15 years, 5 months ago
Im not sure why this is not working, but when is use D3DXGetImageInfoFromFile() The program does not run. I have in this function called every frame: // Clear Back Buffer m_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(r,g,b), 1.0f, 0 ); // Begin the scene if( SUCCEEDED( m_pd3dDevice->BeginScene() ) ) { IDirect3DSurface9 *Surface = NULL; D3DXIMAGE_INFO Info; if (FAILED(D3DXGetImageInfoFromFile ("Smiley1.png",&Info))) {MessageBox(m_hWnd, "Failed", "ERROR", MB_OK);} // End the scene m_pd3dDevice->EndScene(); } m_pd3dDevice->Present(NULL,NULL,NULL,NULL); It works fine without the function but crashes with it. This is the error message: Linking... Prj2.obj : error LNK2019: unresolved external symbol _D3DXGetImageInfoFromFileA@8 referenced in function "public: virtual bool __thiscall CustomWindow::Frame(void)" (?Frame@CustomWindow@@UAE_NXZ) C:\Documents and Settings\JB\My Documents\Visual Studio 2008\Projects\Prj2\Debug\Prj2.exe : fatal error LNK1120: 1 unresolved externals Thanks in advance, Jacob
Advertisement
Did you put "d3dx9d.lib" or "d3dx9.lib" in the additional dependencies?
Thank you, Sir.
You're welcome.

This topic is closed to new replies.

Advertisement