Gần đây tôi đã nhận được mã nguồn trên một ứng dụng. Khi im cố gắng xây dựng giải pháp, tôi gặp lỗi ở tất cả các phần trong đó có winnt.h
. Các mã lỗi khác một chút, nhưng họ luôn trỏ đến những dòng này trong winnt.h:lỗi cú pháp: thiếu ';' trước khi nhận dạng 'PVOID64' khi biên dịch winnt.h
typedef void *PVOID;
typedef void * POINTER_64 PVOID64;
và
struct {
DWORD crc;
BYTE rgbReserved[14];
} CRC;
Vì vậy, những gì có thể là nguyên nhân gây ra điều này? winnt.h là tiêu đề chuẩn và chưa được sửa đổi. Liệu nó có liên quan gì đến tôi khi sử dụng VS 2010 hay tôi sử dụng các cửa sổ 64-bit? hoặc là một số loại cấu hình cần thiết?
EDIT: Đây là chính xác lỗi mã:
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(290): error C2146: syntax error : missing ';' before identifier 'PVOID64'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(290): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(8992): error C2146: syntax error : missing ';' before identifier 'Buffer'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(8992): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(11525): error C2059: syntax error : 'constant'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(11525): error C2238: unexpected token(s) preceding ';'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(11556): error C2059: syntax error : 'constant'
1>C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(11556): error C2238: unexpected token(s) preceding ';'
Vui lòng gửi (các) lỗi chính xác – Konrad
Có vẻ như đang cố gõ hai tên cùng một lúc? Khá chắc chắn đó không phải là tiêu chuẩn. – BoBTFish
Đã thêm mã lỗi –