hey. I'm back. Where did everyone go? Hopefully there is a few experts left here to help out. It's kind of scarey posting on a board that is so dead.
I'm getting a linking error when compiling on MSVC 6.0. I am trying to make a Tetris game and am learning how to load bitmaps. This program is supposed to load bitmaps. I added the bitmap to the project but still get the linking error.
--------------------Configuration: Tetrisbegin - Win32 Debug--------------------
Linking...
tetrisbeg.obj : error LNK2001: unresolved external symbol _DirectDrawCreateEx@16
Debug/Tetrisbegin.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Tetrisbegin.exe - 2 error(s), 0 warning(s)
Here is the code at which directdrawcreateEx is called
Code:
int Game_Init(void *parms)
{
// this function is where you do all the initialization
// for your game
// create object and test for error
if (DirectDrawCreateEx(NULL, (void **)&lpdd, IID_IDirectDraw7, NULL)!=DD_OK)
return(0);
// set cooperation level to windowed mode normal
if (lpdd->SetCooperativeLevel(main_window_handle,
DDSCL_ALLOWMODEX | DDSCL_FULLSCREEN |
DDSCL_EXCLUSIVE | DDSCL_ALLOWREBOOT)!=DD_OK)
return(0);
// set the display mode
if (lpdd->SetDisplayMode(SCREEN_WIDTH,SCREEN_HEIGHT,SCREEN_BPP,0,0)!=DD_OK)
return(0);
// Create the primary surface
memset(&ddsd,0,sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
ddsd.dwFlags = DDSD_CAPS;
ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
if (lpdd->CreateSurface(&ddsd,&lpddsprimary,NULL)!=DD_OK)
return(0);
// now load the 16 bit color bitmap
Load_Bitmap_File(&bitmap16bit, "ANDRE16.BMP");
// return success
return(1);
} // end Game_Init
I appreciate any help at all.
BTW, I didn't write that code. I am not at that stage yet. Just trying understand why it has a problem with directdrawcreateEx. Thanks in advance for replies.