错误提示如下:错误 1 error C2059: syntax error : ';' D:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SDK\include\ARMV4I\winnt.h 128对应winnt.h文件中的语句为:typedef void *POINTER_64;该如何解决?谢谢!

解决方案 »

  1.   

    是不是版本转换或者工程移植过程中的错误?
    新建工程试一下!参考:http://topic.csdn.net/t/20060723/00/4898405.html
      

  2.   

    同样的工程,在其他电脑上就可编译通过,运行环境是一样的,应该说明不是工程本身的问题吧?
    我把Windows Mobile 5.0 Pocket PC SDK重新安了一遍,问题还是没有解决
      

  3.   

    1楼说的,
    一般把<windows.h>  放在最前试试。
     
      

  4.   

    没有包含windows.h呀
    我加了一个#include <windows.h>,还是报错
      

  5.   


    typedef   void   *POINTER_64; 这句语法错误啦
    改成下面试试typedef   void   *   POINTER_64   aaa;   
      

  6.   

    1.千万别改winnt.h, 微软出错的概率还是极低的
    2.把#include "winnt.h"放在stdafx.h试试。
    我建的工程是这样include 的,你试试
    #include <windows.h>
    #include <wincrypt.h>
    #include <iostream>
    #include <winnt.h>
      

  7.   

    我是修改过winnt.h,因为原先工程出现的错误如下:错误 1 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 2 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 3 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 4 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 5 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 6 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 7 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 8 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 9 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 10 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 11 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 12 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 13 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 14 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 15 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 16 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 17 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 18 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 19 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 20 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 21 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 22 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 23 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 24 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 25 error C2065: 'vector' : undeclared identifier
    错误 26 error C2275: 'CString' : illegal use of this type as an expression
    错误 27 error C2065: 'vStrLine' : undeclared identifier
    错误 28 error C2228: left of '.push_back' must have class/struct/union
    错误 29 error C2275: 'CString' : illegal use of this type as an expression
    错误 30 error C2039: 'iterator' : is not a member of '`global namespace''
    错误 31 error C2065: 'iterator' : undeclared identifier
    错误 32 error C2146: syntax error : missing ';' before identifier 'it'
    错误 33 error C2065: 'it' : undeclared identifier
    错误 34 error C2228: left of '.begin' must have class/struct/union
    错误 35 error C2228: left of '.end' must have class/struct/union
    错误 36 error C2143: syntax error : missing ')' before '++'
    错误 37 error C2059: syntax error : ';'
    错误 38 error C2059: syntax error : ')'
    错误 39 error C2143: syntax error : missing ';' before '{'
    错误 40 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 41 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 42 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 43 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 44 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 45 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 46 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 47 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 48 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 49 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 50 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
      

  8.   

    错误 50 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 51 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 56 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 57 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 58 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 59 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 60 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 61 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 62 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 63 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 64 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 65 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 66 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 67 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 68 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 69 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 70 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 71 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 72 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 73 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 74 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 75 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 76 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 77 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 78 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 79 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 80 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 81 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 82 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 83 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 87 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 88 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 89 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 90 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 91 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 92 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 93 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 94 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 95 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 96 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 97 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 98 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 99 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 100 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 101 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 102 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
    错误 103 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 104 error C2146: syntax error : missing ';' before identifier 'PROPERTY_FILE_NAME'
    错误 105 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    错误 106 error C2440: 'initializing' : cannot convert from 'const char [9]' to 'int'
      

  9.   

    后来我在网上查到,将winnt.h文件中的typedef   void   *POINTER_64 PVOID64;修改成
    typedef   void   *POINTER_64;
    typedef   void   *PVOID64;
    可以解决这些错误,但修改后这些错误没有了,却出现了开始提到的winnt.h文件中的那个错误
      

  10.   

    我重装过Windows Mobile 5.0 Pocket PC SDK,还是这个问题
      

  11.   

    其中前24个错误对应的语句如下:
    const string PROPERTY_FILE_NAME = "\\abc.dat";
    看不出这句有什么问题呀而且同样的工程在其他电脑上运行就没问题,运行环境是一样的