linker error
I don''t know if this is the right forum for this buuuuut...
I''m trying to make my own header, sort of a directdraw wrapper I guess and when I try to compile my program I get this error
tryout.obj : error LNK2001: unresolved external symbol "int __cdecl CreateDirectDrawInterface(void)" (?CreateDirectDrawInterface@@YAHXZ)
My program is just a minimum windows program with a call to this function
int CreateDirectDrawInterface()
{
if(FAILED(DirectDrawCreate(NULL, &lpdd, NULL)))
DXError(1);
if(FAILED(lpdd->QueryInterface(IID_IDirectDraw4,
(LPVOID *)&lpdd4)))
DXError(2);
if(FAILED(lpdd->Release()))
DXError(5);
lpdd = NULL;
if(FAILED(lpdd4->SetCooperativeLevel(hwnd,
DDSCL_EXCLUSIVE /
DDSCL_FULLSCREEN /
DDSCL_ALLOWMODEX /
DDSCL_ALLOWREBOOT)
DXError(3);
}
which is located in my DXWrap.h header file.
Can someone help me out here im stumped.
There's always something smaller and something bigger. Don't sweat the small stuff and don't piss off the big stuff :)
Try declaring the function before u call it.
// declare it
extern int CreateDirectDrawInterface()
// call it
CreateDirectDrawInterface()
// define it
int CreateDirectDrawInteface()
{
//.. blah, blah.
}
// declare it
extern int CreateDirectDrawInterface()
// call it
CreateDirectDrawInterface()
// define it
int CreateDirectDrawInteface()
{
//.. blah, blah.
}
Thanks but i just forgot to add the header to my project.
I''m going to have to get some sleep one of these days.
I''m going to have to get some sleep one of these days.
There's always something smaller and something bigger. Don't sweat the small stuff and don't piss off the big stuff :)
April 02, 2000 04:54 PM
I hate linker errors, they''re less useful than compiler errors.
-CobraA1
-CobraA1
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement