newbie problem; intializing DDraw

Started by
4 comments, last by ChocaPaluza123 22 years, 7 months ago
hey everybody, i was reading the tricks, and it said in order to create a ddraw object, you have to do this: LPDIRECTDRAW lpdd = NULL; // standard DirectDraw 1.0 LPDIRECTDRAW4 lpdd4 = NULL; // DirectDraw 6.0 interface 4 // first create base IDirectDraw interface if (FAILED(DirectDrawCreate(NULL,&lpdd,NULL))) { return 0; } // now query for IDirectDraw4 if (FAILED(lpdd->QueryInterface(IID_IDirectDraw4, (LPVOID *)*lpdd4))) { return 0; } It just doesn't want to work! it returns something like: error 750234740555043: IDirectDraw4 unknown symbol I think its from the linker in MSVC. I included the include file, and the lib file but it doesnt work! thanks in advance Edited by - ChocaPaluza123 on August 25, 2001 11:17:45 PM
C++
Advertisement
Yeah I got this error a lot too. Sometimes I just made my own project, copied everything into it, included "c:\dx6\lib\*.lib" (C:\dx6 is where I installed), and it would then run fine. Oh yeah, also include the winmm.lib. You include all the stuff in the project options folder (just if you didn''t know)
Half the people you know are below average.Trogdor the Burninator
You have to create a new project and you also have to change the project setting, so you have to include ddraw.lib and dxguid.lib! After that you have to include in your .cpp!
Then everything just works fine.
Bye
quote:Original post by Anonymous Poster
You have to create a new project and you also have to change the project setting, so you have to include ddraw.lib and dxguid.lib! After that you have to include in your .cpp!
Then everything just works fine.
Bye



Sorry, you also have to #include "ddraw.h"
Bye


Don''t know for sure but try linking the dxguid.lib.
Adulthood is the vehicle for making you childhood dreams come true.
IT WORKED!!!!!!!!!!!!!!!!!!!!
Thanks you guys, i just included C:\mssdk\lib\*.lib in the Project->Settings, and it worked! I can''t thank you enough! Before I just chose to, instead of QueryInterfacce in order to get DDraw 4, I just used DDraw 1!!!!!!!!!
I''m suprised that slipped by me and all those other people!!

( )
@@
- Say hello to Afrodite

_____
\@-@/
_ now say hello to me!
C++

This topic is closed to new replies.

Advertisement