Jump to content
  • Advertisement
Sign in to follow this  
vinb

VS 2005 linking error

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

Share this post


Link to post
Share on other sites
Advertisement
You need to add ddraw.lib in Project->Properties->Configuration Properties->Linker->Input->Additional Dependencies.


jfl.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Unbelievable! It was a missing path in my search directories. Thanks for the help guys. Ok, back to work...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!