HELP! C++ DirectX programming: Win32 application compiling problems with Platform SDK

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Feb 2008
Posts: 106
Reputation: Clawsy is an unknown quantity at this point 
Solved Threads: 5
Clawsy Clawsy is online now Online
Junior Poster

HELP! C++ DirectX programming: Win32 application compiling problems with Platform SDK

 
0
  #1
May 1st, 2009
I try to program DirectX in Visual C++ 2008. I need at least a win32 working window.
I have a BIG problem compiling win32.

First, I created a win32 project (a simple Win32 Project - not empty). I don’t modify any code compile when compiler says: Cannot find windows.h. So I installed Platform SDK for Windows (PlatformSDK_Svr2003SP1). Same problem. I tried "Register PSDK Directories with Visual Studio". Same problem. PSDK entries are not present in VS2008->Tools->Options->Projects and Solutions->VC++ DIrectories so I MANUALY set up path for Bin, Include, Lib in VC++ Directories. As a result, it included windows.h but some other files could be opened so I added other PSDK subdirectories path in VC++ Directories until all files were found. I read both PSDK and C++ help file (about PSDK) and I put those paths BEFORE Visual C++ Installation paths as those help file were telling me to do.

NOW THE BIG PROBLEM:
A lot of LNK compilation errors:

Error 10 error LNK2001: unresolved external symbol __RTC_InitBase b.obj b
Error 9 error LNK2001: unresolved external symbol __RTC_Shutdown b.obj b
Error 26 error LNK2001: unresolved external symbol _wWinMainCRTStartup b b
Error 24 error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 7 error LNK2019: unresolved external symbol @_RTC_CheckStackVars@8 referenced in function _wWinMain@16 b.obj
b
Error 23 error LNK2019: unresolved external symbol ___security_cookie referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 19 error LNK2019: unresolved external symbol __imp__BeginPaint@8 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 16 error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "int __cdecl
InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) b.obj b
Error 20 error LNK2019: unresolved external symbol __imp__DefWindowProcW@16 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 21 error LNK2019: unresolved external symbol __imp__DestroyWindow@4 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 22 error LNK2019: unresolved external symbol __imp__DialogBoxParamW@20 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 1 error LNK2019: unresolved external symbol __imp__DispatchMessageW@4 referenced in function _wWinMain@16 b.obj
b
Error 25 error LNK2019: unresolved external symbol __imp__EndDialog@8 referenced in function "int __stdcall
About(struct HWND__ *,unsigned int,unsigned int,long)" (?About@@YGHPAUHWND__@@IIJ@Z) b.obj b
Error 18 error LNK2019: unresolved external symbol __imp__EndPaint@8 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 4 error LNK2019: unresolved external symbol __imp__GetMessageW@16 referenced in function _wWinMain@16 b.obj
b
Error 5 error LNK2019: unresolved external symbol __imp__LoadAcceleratorsW@8 referenced in function _wWinMain@16
b.obj b
Error 12 error LNK2019: unresolved external symbol __imp__LoadCursorW@8 referenced in function "unsigned short __cdecl
MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z) b.obj b
Error 13 error LNK2019: unresolved external symbol __imp__LoadIconW@8 referenced in function "unsigned short __cdecl
MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z) b.obj b
Error 6 error LNK2019: unresolved external symbol __imp__LoadStringW@16 referenced in function _wWinMain@16 b.obj
b
Error 17 error LNK2019: unresolved external symbol __imp__PostQuitMessage@4 referenced in function "long __stdcall
WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) b.obj b
Error 11 error LNK2019: unresolved external symbol __imp__RegisterClassExW@4 referenced in function "unsigned short
__cdecl MyRegisterClass(struct HINSTANCE__ *)" (?MyRegisterClass@@YAGPAUHINSTANCE__@@@Z) b.obj b
Error 15 error LNK2019: unresolved external symbol __imp__ShowWindow@8 referenced in function "int __cdecl
InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) b.obj b
Error 3 error LNK2019: unresolved external symbol __imp__TranslateAcceleratorW@12 referenced in function _wWinMain@16
b.obj b
Error 2 error LNK2019: unresolved external symbol __imp__TranslateMessage@4 referenced in function _wWinMain@16 b.obj
b
Error 14 error LNK2019: unresolved external symbol __imp__UpdateWindow@4 referenced in function "int __cdecl
InitInstance(struct HINSTANCE__ *,int)" (?InitInstance@@YAHPAUHINSTANCE__@@H@Z) b.obj b
Error 8 error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _wWinMain@16 b.obj b
Error 27 fatal error LNK1120: 26 unresolved externals C:\Documents and Settings\Claudiu.CLAU\My Documents\Visual
Studio 2008\Projects\b\Debug\b.exe b


I tried a lot (days). I am desperate. Please, has anyone a perfect recipe for compiling win32 applications on Visual C++ 2008 using Platform SDK? Or some other way to program DirectX in Visual C++ (Win32)? Because I don’t know what to do. I can’t program any win32 native application (I also tried with VS2005: exactly the same problems).

I’m sure there is someone on this forum who programmed DirectX in Visual C++ who can tell me what to do. Hope I was clear about my problem. Thanks and I will appreciate every help.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,639
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1497
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: HELP! C++ DirectX programming: Win32 application compiling problems with Platform SDK

 
0
  #2
May 1st, 2009
Which edition of 2008 are you using (Express, Pro, etc) ? I have the Express version, downloaded the SDK Aug 2008, set up the directory paths, compiled and linked a sample program, and all went without a problem.

Before trying to write your own problem compile one of the samples to make sure your compiler's directories are set up correctly.
Last edited by Ancient Dragon; May 1st, 2009 at 4:15 pm.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 106
Reputation: Clawsy is an unknown quantity at this point 
Solved Threads: 5
Clawsy Clawsy is online now Online
Junior Poster

Re: HELP! C++ DirectX programming: Win32 application compiling problems with Platform SDK

 
0
  #3
May 4th, 2009
OK I HAD 2008 PE but i installed c++ 2005 express, set up the paths and all right now. Thanks for reply. I think it was my VS 2008 PE that was not integrating well PSDK. Thread solved.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum


Views: 1161 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC