Sign in to follow this  

Linker Error

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

Extreme newbie question......... I tried to compile the following: try.cpp(that's my trial source file), ddutil.cpp,ddutil.h, resource.h,script1.rc and the external dependencies boy.bmp and basetsd.h and I got the following linker error: Configuration: test - Win32 Debug-------------------- Linking... try.obj : error LNK2001: unresolved external symbol _DirectDrawCreate@12 Debug/test.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. test.exe - 2 error(s), 0 warning(s) Please what could be the problem?

Share this post


Link to post
Share on other sites
If you are creating an application that uses DirectX, you must link with the DirectX libraries. You should include references to:
- d3d9.lib (obgliatory)
- d3dx9.lib (if you use it)
- dxguid.lib (if you use guids)
- etc

Greetz,

Illco

Share this post


Link to post
Share on other sites
In your project settings add ddraw.lib to the list of libraries to be linked. I'm not sure which version of VC++ you have so I can't tell you exactly where it is, but it shouldn't be too hard to find.

Share this post


Link to post
Share on other sites

This topic is 4546 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this