Original Post
Hi guys. I'm trying to compile a c program found in the windows game programming gurus (freakout.cpp) using visual c++ express 2005. I have downloaded the directx sdk and platform sdk and fixed a few compiling errors and now it compiles but won't link. I'm not sure if I have the directx librarys added into the compiler but I have selected the sdk and platform sdk directorys for binarys, includes and libs. I can post the source code if someone tells me the best way to do this. I really want to get started in game programming but I'm spending most of my time troubleshooting the compiler. Here's what I get when linking (sorry if I posted it incorrectly); Linking... blackbox.obj : error LNK2019: unresolved external symbol _DirectDrawCreateEx@16 referenced in function "int __cdecl DD_Init(int,int,int)" (?DD_Init@@YAHHHH@Z) blackbox.obj : error LNK2019: unresolved external symbol __imp__TextOutA@20 referenced in function "int __cdecl Draw_Text_GDI(char *,int,int,int,struct IDirectDrawSurface7 *)" (?Draw_Text_GDI@@YAHPADHHHPAUIDirectDrawSurface7@@@Z) blackbox.obj : error LNK2019: unresolved external symbol __imp__SetBkMode@8 referenced in function "int __cdecl Draw_Text_GDI(char *,int,int,int,struct IDirectDrawSurface7 *)" (?Draw_Text_GDI@@YAHPADHHHPAUIDirectDrawSurface7@@@Z) blackbox.obj : error LNK2019: unresolved external symbol __imp__SetTextColor@8 referenced in function "int __cdecl Draw_Text_GDI(char *,int,int,int,struct IDirectDrawSurface7 *)" (?Draw_Text_GDI@@YAHPADHHHPAUIDirectDrawSurface7@@@Z) freakout.obj : error LNK2019: unresolved external symbol __imp__DefWindowProcA@16 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) freakout.obj : error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) freakout.obj : error LNK2019: unresolved external symbol __imp__EndPaint@8 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) freakout.obj : error LNK2019: unresolved external symbol __imp__BeginPaint@8 referenced in function "long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z) freakout.obj : error LNK2019: unresolved external symbol __imp__DispatchMessageA@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__PeekMessageA@20 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__ShowCursor@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExA@48 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__GetSystemMetrics@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__RegisterClassA@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__GetStockObject@4 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__LoadCursorA@8 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__LoadIconA@8 referenced in function _WinMain@16 freakout.obj : error LNK2019: unresolved external symbol __imp__MessageBeep@4 referenced in function "void __cdecl Process_Ball(void)" (?Process_Ball@@YAXXZ) freakout.obj : error LNK2019: unresolved external symbol __imp__GetAsyncKeyState@4 referenced in function "void __cdecl Process_Ball(void)" (?Process_Ball@@YAXXZ) freakout.obj : error LNK2019: unresolved external symbol __imp__PostMessageA@16 referenced in function "int __cdecl Game_Main(void *)" (?Game_Main@@YAHPAX@Z) C:\C C++ Projects\firstvcproject\Debug\firstvcproject.exe : fatal error LNK1120: 21 unresolved externals