编译错误如下,我是在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.

解决方案 »

  1.   

    你得用最新的SDK开发包,并将其include和lib目录路径加入到VC设置中,保证他们拍在前面。
      

  2.   

    还有,看看是不是少包含了什么文件
    #include <Windows.h>
    User32.lib
    Winuser.h
      

  3.   

    在project->settings->link里包含user32.lib
      

  4.   

    kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
    上面的包都包含了啊
      

  5.   

    要是我要下载最新的sdk的话,要下载什么啊?
      

  6.   

    core sdk
    从微软网站下载最新的core SDK,
    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
    然后安装,设置include和library,再compile就ok了
      

  7.   

    sdk太老下载
    http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
    然后安装,设置include和library
    就好了