Archived

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

Mulligan

A link error...

Recommended Posts

Im going through some code of mine, converting it from an earlier version of DirectDraw to version 7.0, and now im getting a linker error. Linking... DDrawMgr.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw7 I have #pragma comment(lib, "ddraw.lib") in the source file, and the two symbols the error refers to are in this: ddrval = CoCreateInstance( CLSID_DirectDraw, NULL, CLSCTX_ALL, IID_IDirectDraw7, (void**)&m_pDDraw ); oh yea, another question, shouldnt the first parameter be CLSID_DirectDraw7, not CLSID_DirectDraw? This is MSDN code, so i havent changed it, but it seems like its wrong. is it? [edited by - Mulligan on January 6, 2004 3:30:01 PM]

Share this post


Link to post
Share on other sites
Add

#pragma comment(lib,"dxguid.lib")

And no, it shouold NOT be CLSID_DirectDraw7. The The CLSID_DirectDraw tells it what "class" of interface you want. IID_IDirectDraw7 tells it which version of the interface to use.

Share this post


Link to post
Share on other sites