Advertisement Jump to content


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


Linker Error

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

Main.obj : error LNK2001: unresolved external symbol _DirectDrawCreate@12 I''m working through Windows Game Programming for Dummies and am trying to implement my DirectX stuff in a Class called Ngine. I''m building it step by step in "skeleton code" fashion and running into the error above. Here''s the code: // -- Ngine.h -- #ifndef Ngine_h #define Ngine_h #include class Ngine { public: Ngine(); ~Ngine(); bool InitDirectX(); private: LPDIRECTDRAW lpDirectDraw; }; #endif // -- Ngine.cpp -- #include "Ngine.h" Ngine:: Ngine() { }; Ngine:: ~Ngine() { }; bool Ngine:: InitDirectX() { if (DirectDrawCreate(NULL, &lpDirectDraw, NULL) != DD_OK) { return false; } return true; }; I''m simply trying to set the private data member "lpDirectDraw" via the DirectDrawCreate() accessor function. Is that somehow not allowed (or is my code incorrect and I just can''t see it?) NOTE: I''m using MS Visual C++ 6.0 Enterprise. My DirectX Include directory (C:\mssdk\include\) and my Libraries directory (C:\mssdk\lib\) both are at the top of their respective lists. Could I be missing something in the SDK?

Share this post

Link to post
Share on other sites
forgot to do something in the previous post... hehe...

the line that reads: #include

should read: #include <ddraw.h#gt;

I forgot about the HTML formatting codes for < and >. I assure anyone reading this that I did not forget to include ddraw.h in my code. (Silly me)

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!