Linker Error

Started by
2 comments, last by Temmy 18 years, 9 months ago
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?
Advertisement
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
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.
Hey! Thanks for the very fast responses! I'm using Microsoft visual C++ 6.0 and DirectX.

This topic is closed to new replies.

Advertisement