VS 2005 linking error

Started by
3 comments, last by vinb 17 years, 11 months ago
I hate stupid things like this. I have upgraded to Visual Studio .NET 2005 from VS 2003 .NET. It used to compile fine. Now I'm getting the following linking error:
Error 21 error LNK2019: unresolved external symbol _DirectDrawCreateEx@16 referenced in function "bool __cdecl Graphics::InitDirectDraw(struct HWND__ *)" (?InitDirectDraw@Graphics@@YA_NPAUHWND__@@@Z) BlackJack.obj
I made sure all the directory info was the same in VS2005 but still no luck. Anybody have any idea why this is happening? I really wanted to get back to work on this project but my IDE isn't letting me. Thanks
Advertisement
You need to add ddraw.lib in Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies.


jfl.
Did you link with the DirectDraw libraries? You must include ddraw.lib and dxguid.lib to your project, either from the project settings or by adding these lines to a header file:
#pragma comment(lib, "ddraw.lib");
#pragma comment(lib, "dxguid.lib");

Hope this helps.


EDIT: beat-me-up
I actually had the #pragma lines already but still no luck. After looking at the error more carefully, I am noticing that it is choking on "struct HWND". Could it be another library that it's looking for?
Unbelievable! It was a missing path in my search directories. Thanks for the help guys. Ok, back to work...

This topic is closed to new replies.

Advertisement