Jump to content
  • Advertisement

Archived

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

SoGreen

linker error

This topic is 6771 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 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.

Share this post


Link to post
Share on other sites
Advertisement
Try declaring the function before u call it.

// declare it
extern int CreateDirectDrawInterface()

// call it
CreateDirectDrawInterface()

// define it
int CreateDirectDrawInteface()
{
//.. blah, blah.
}

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I hate linker errors, they''re less useful than compiler errors.

-CobraA1

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!