Archived

This topic is now archived and is closed to further replies.

Linker Error

This topic is 5503 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''m trying to start learing Direct X and I''m using VC++. Every time I compile it gives me the link error posted at the bottom. I''ve put the include file and lib files at the top of the search files, but I think I''m still missing something. I''ve tried to compile other demo dx programs from books and I keep getting this same error. It''s the only error listed. Can somebody tell me how to fix this? Thanks. Linking... testing 1.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16 testing 1.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7 Debug/testing 1.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. ~Danny~

Share this post


Link to post
Share on other sites
I'm not sure what you mean by placing the lib files at the top of the search files, but in order to link with certain libraries, you must append them to the libs line in your project options. What you need to do is go to Project->Project Options and then navigate to the Link tab. Somewhere in the middle is a TextEdit box which has all of the libraries that you are currently linked with (You will see things like kernel32.lib, win32.lib and many other windows libs here). You want to scroll over to the end of this line and add the appropriate libraries that DirectX uses. Now I am an OpenGL fan and have never used DirectX before, but you will probably add something like directx.lib or dx.lib or something like that to this line. Your DirectX book should tell you which ones you want.

- be pround to be out of your mind

[edited by - WhtRbt on November 21, 2002 3:01:27 PM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
also don''t forget to include dxguid.lib for all your direct x needs.

Share this post


Link to post
Share on other sites