Linker Error
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?
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)
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)
Try adding ddraw.lib to your project.
Martin
Martin
______________Martin EstevaolpSoftware
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement