编译错误如下,我是在windows2000下编译的,结果说找不到几个函数和常量,好像在window.h中没有定义,不知道为什么,大家帮帮我吧.
Compiling...
ErrorShow.cpp
You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
d:\corewindows\cmnhdr.h(213) : error C2065: 'GetWindowLongPtr' : undeclared identifier
d:\corewindows\cmnhdr.h(213) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2065: 'PCTSTR' : undeclared identifier
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2146: syntax error : missing ')' before identifier 'LocalLock'
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2059: syntax error : ')'
d:\corewindows\01-errorshow\errorshow.cpp(125) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Error executing cl.exe.
Compiling...
ErrorShow.cpp
You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
d:\corewindows\cmnhdr.h(213) : error C2065: 'GetWindowLongPtr' : undeclared identifier
d:\corewindows\cmnhdr.h(213) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2065: 'PCTSTR' : undeclared identifier
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2146: syntax error : missing ')' before identifier 'LocalLock'
d:\corewindows\01-errorshow\errorshow.cpp(83) : error C2059: syntax error : ')'
d:\corewindows\01-errorshow\errorshow.cpp(125) : error C2664: 'DialogBoxParamA' : cannot convert parameter 4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Error executing cl.exe.
#include <Windows.h>
User32.lib
Winuser.h
上面的包都包含了啊
从微软网站下载最新的core SDK,
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
然后安装,设置include和library,再compile就ok了
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
然后安装,设置include和library
就好了