• Advertisement

Archived

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

"Unresolved external" linker error

This topic is 5714 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 just now starting on DirectX for C/C++. I''ve done it in Visual Basic; but since I''m getting more and more accustomed to C/C++, I''ve decided to move my DirectX studies there (and besides, most tutorials and source code is done in C/C++ anyway!). Now, to my error: everything is fine until I do this..... DirectDrawCreateEx(NULL, (VOID**)&ddraw, IID_IDirectDraw7, NULL); I have a global ''ddraw'' that was declared like this..... static LPDIRECTDRAW7 ddraw = NULL; Now, when I call the DirectDrawCreateEx, I get a nasty linker error that I cannot get compiler help on. It says "Unresolved external ''_IID_IDirectDraw7'' referenced from module GW_MAIN.CPP" and "Unresolved external ''DirectDrawCreateEx'' referenced from module GW_MAIN.CPP". I hit F1 for help, by my Borland C++ compiler will not give me any help on this one. If anyone can give me help on this, it would be greatly appreciated.

Share this post


Link to post
Share on other sites
Advertisement
you''re linking the wrong DirectX libraries or none at all. Check your project settings.

Share this post


Link to post
Share on other sites
This comes up a lot in the forums, and there is probably a previous discussion of this on here somewhere. Anyway,

1. Make sure you have the updated DirectX libs. You need at least v7.0. If you need them, try msdn.microsoft.com.

2. Ensure that the libs are linked.

Let me know if this helps.

EDIT: Fixed link.

------------------------------
Omnipotent_Q
"Poor people are crazy. I'm eccentric."

[edited by - Omnipotent_Q on May 29, 2002 1:06:52 PM]

Share this post


Link to post
Share on other sites
Well, I''ve set my compiler to look at both Borland''s libraries and DirectX''s Borland libraries (version 7a), but I STILL get those annoying "unresolved externals". Borland''s IDE doesn''t really give me much flexibility in deciding which libraries to even look at, and I''m wondering why the documentation is so "thin" on this subject. Guess I''ll try some searching on the forums. Thanks guys for posting your advice.

Share this post


Link to post
Share on other sites

  • Advertisement