Jump to content
  • Advertisement

Archived

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

tin8

Can't link DirectDrawCreate.

This topic is 5659 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

Hi, I have problem on linking the following direct-draw code. #include <ddraw.h> LPDIRECTDRAW lpDD; bool DirectDrawInit(HWND hwnd) { HRESULT ddrval; ddrval = DirectDrawCreate( NULL, &lpDD, NULL ); if( ddrval != DD_OK ) { return(false); } return true; } error LNK2019: unresolved external symbol _DirectDrawCreate@12 referenced in function "bool __cdecl DirectDrawInit(struct HWND__ *)" (?DirectDrawInit@@YA_NPAUHWND__@@@Z) I''m using Visual C++ .NET vision 2003 on a Windows XP box with directx 9 sdk. I looked in the direct-draw header file and found that the function ''DirectDrawCreate'' was defined as external as below. extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter ); So, what can I do? I want to create a direct-draw object. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I''ve included the directx lib in the project property page in the tool.

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!