Archived

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

Jimpan

Link error

Recommended Posts

When I compile this code: #include LPDIRECTDRAW lpDD; bool DirectDrawInit(HWND hwnd) { HRESULT ddrval; ddrval = DirectDrawCreate( NULL, &lpDD, NULL ); if( ddrval != DD_OK ) { return(false); } ddrval = lpDD->SetCooperativeLevel( hwnd, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN ); if( ddrval != DD_OK ) { lpDD->Release(); return(false); } ddrval = lpDD->SetDisplayMode( 640, 480, 8); if( ddrval != DD_OK ) { lpDD->Release(); return(false); } return(true); } I get this Error message: Error: Unresolved external ''WinMain'' referenced from C:\BORLAND\BCC55\LIB\C0W32. OBJ I used borland 5.5 free-compiler and I wrote bcc32 -W direct.cpp

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You do not have a WinMain function. If you just want to compile it type
bcc32 /c direct.cpp
and you should get a direct.obj

Share this post


Link to post
Share on other sites