Archived

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

Ironica

DirectDraw Beginner, compile errors =(

Recommended Posts

Ironica    128
Hey, I''m following this article: http://www.gamedev.net/reference/articles/article1838.asp I''ve read it, copied and pasted the examples, and tryed to compile. I''m using DirectX 9 SDK, but I can''t understand why I get these errors. At first, it gave me linker errors, so I inluded all of the DX90SDK\Samples\Common\* files in the project, and I get these errors: c:\DX90SDK\Samples\C++\Common\ddutil.cpp(274) : error C2511: ''HRESULT CDisplay::CreateSurfaceFromBitmap(CSurface ** ,TCHAR *,DWORD,DWORD)'' : overloaded member function not found in ''CDisplay'' c:\DX90SDK\Samples\C++\Common\ddutil.h(42) : see declaration of ''CDisplay'' c:\DX90SDK\Samples\C++\Common\ddutil.cpp(339) : error C2511: ''HRESULT CDisplay::CreateSurfaceFromText(CSurface ** ,HFONT,TCHAR *,COLORREF,COLORREF)'' : overloaded member function not found in ''CDisplay'' c:\DX90SDK\Samples\C++\Common\ddutil.h(42) : see declaration of ''CDisplay'' c:\DX90SDK\Samples\C++\Common\ddutil.cpp(850) : error C2511: ''HRESULT CSurface::DrawTextA(HFONT,TCHAR *,DWORD,DWORD,COLORREF,COLORREF)'' : overloaded member function not found in ''CSurface'' c:\DX90SDK\Samples\C++\Common\ddutil.h(109) : see declaration of ''CSurface'' c:\DX90SDK\Samples\C++\Common\ddutil.cpp(890) : error C2511: ''HRESULT CSurface::DrawBitmap(TCHAR *,DWORD,DWORD)'' : overloaded member function not found in ''CSurface'' c:\DX90SDK\Samples\C++\Common\ddutil.h(109) : see declaration of ''CSurface'' Being a beginner, I have no idea what this means >.< hehe. I have the following addtional include directories: DX90SDK\include DX90SDK\Samples\Common Have I missed something? Only difference is, I didn''t copy the dxutil and ddutil files to the current directory, I included them from DX90SDK\Samples\Common\. Sorry for being a newbie ^^

Share this post


Link to post
Share on other sites
iron_monkey    122
You get these overloaded errors only when you use the functions that are the same as they are declared in your Class Declaration in your header file but differ only in arguments or order of arguments in the definition of the function( i.e in your cpp file).

So, check the function definitions and their corresponding prototypes in respective files.

Share this post


Link to post
Share on other sites