Skip to main content
gamedev.net
🔒 Locked

A link error...

Started by Mulligan 0 replies 400+ views
Original Post
Mulligan
Mulligan
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]
Dave Hunt
Dave Hunt
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.