0

I've been attempting to get DirectDraw to function on a CE5.0 framework for the last week and I'm running into some very odd issues.

ddrval = DirectDrawCreate(NULL, &lpDD, NULL);

When I have this function in my code, I get "error LNK2019: unresolved external symbol _DirectDrawCreate referenced in function "bool __cdecl DirectDrawInit(struct HWND__ *)" (?DirectDrawInit@@YA_NPAUHWND__@@@Z)"

The function itself exists in the .h, as I can jump directly to it, which makes me think I'm missing a library, but I have no idea how to check or fix this as it is being built for a remote CE5.0 device. I also run into a few other subtile hints that I am missing something such as LR_CREATEDIBSECTION and other LR constants not existing and small differences in types (HBITMAP not being liked and LPCWSTR being prefered).

Any assistance would be greatly appreciated. Just as a note, WindowsMobile5.0 code doesn't work on the device, and if I comment out the offending function the code compiles and runs (it's not being used as DirectDrawCreate is kind of important but the LNK error goes away)

Lunin
  • 370
  • 2
  • 9

1 Answers1

4

You should link your program with ddraw.lib. This is the import lib for direct draw on windows mobile.

  • Thanks, that seems to have taken care of the issue. I did a bunch of searching beforehand but the ones that seemed most like my problem were coming from a lack of having dxguid.lib, which of course then completely failed to help when I attached it (I also found out I was attaching .libs in VS2008 C++ incorrectly, but a bit more searching took care of that one). – Lunin Dec 03 '10 at 16:49