Sign in to follow this  
Temmy

Linker Error

Recommended Posts

Temmy    122
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
Illco    928
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
Stephen R    721
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

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