error C2143: syntax error: missing ':' before 'constant'
-
I am getting an error in a windows include winioctl.h
typedef union {
USN_RECORD_COMMON_HEADER Header;
USN_RECORD_V2 V2; <===
USN_RECORD_V3 V3; <===
USN_RECORD_V4 V4; <====
} USN_RECORD_UNION, *PUSN_RECORD_UNION;for the 3 lines pointed to by the errors the code built find with the windows sdk 8 I migrated the application to windows 10 and am using the windows 10 sdk Thanks
-
I am getting an error in a windows include winioctl.h
typedef union {
USN_RECORD_COMMON_HEADER Header;
USN_RECORD_V2 V2; <===
USN_RECORD_V3 V3; <===
USN_RECORD_V4 V4; <====
} USN_RECORD_UNION, *PUSN_RECORD_UNION;for the 3 lines pointed to by the errors the code built find with the windows sdk 8 I migrated the application to windows 10 and am using the windows 10 sdk Thanks
ForNow wrote:
...for the 3 lines pointed to by the errors...
And that error would be what?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
ForNow wrote:
...for the 3 lines pointed to by the errors...
And that error would be what?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
C2143 syntax error missing ':' before constant the error might make sense if
USN_RECORD_COMMON_HEADER
wasn't defined but it is a few lines above
But are USN_RECORD_V2 USN_RECORD_V3 USN_RECORD_V4 defined? That's where I'd look, given your original error messages.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
-
C2143 syntax error missing ':' before constant the error might make sense if
USN_RECORD_COMMON_HEADER
wasn't defined but it is a few lines above
ForNow wrote:
C2143 syntax error missing ':' before constant the error might make sense if
USN_RECORD_COMMON_HEADER
wasn't defined but it is a few lines above
Could you post these "few lines"?
-
I am getting an error in a windows include winioctl.h
typedef union {
USN_RECORD_COMMON_HEADER Header;
USN_RECORD_V2 V2; <===
USN_RECORD_V3 V3; <===
USN_RECORD_V4 V4; <====
} USN_RECORD_UNION, *PUSN_RECORD_UNION;for the 3 lines pointed to by the errors the code built find with the windows sdk 8 I migrated the application to windows 10 and am using the windows 10 sdk Thanks
-
I am getting an error in a windows include winioctl.h
typedef union {
USN_RECORD_COMMON_HEADER Header;
USN_RECORD_V2 V2; <===
USN_RECORD_V3 V3; <===
USN_RECORD_V4 V4; <====
} USN_RECORD_UNION, *PUSN_RECORD_UNION;for the 3 lines pointed to by the errors the code built find with the windows sdk 8 I migrated the application to windows 10 and am using the windows 10 sdk Thanks
Check the
typedef
s of the three structures that fail for mutual non standard members. A candidate is theUSN
member. Do you have adefine
directive using the same name anywhere in your project? If that does not help enable the creation of preprocessor output files. Then you can check what the compiler "sees". -
ForNow wrote:
C2143 syntax error missing ':' before constant the error might make sense if
USN_RECORD_COMMON_HEADER
wasn't defined but it is a few lines above
Could you post these "few lines"?
-
But are USN_RECORD_V2 USN_RECORD_V3 USN_RECORD_V4 defined? That's where I'd look, given your original error messages.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
typedef USN_RECORD_V2 USN_RECORD, *PUSN_RECORD;
typedef struct {
DWORD RecordLength; WORD MajorVersion; WORD MinorVersion; FILE\_ID\_128 FileReferenceNumber; FILE\_ID\_128 ParentFileReferenceNumber; USN Usn; LARGE\_INTEGER TimeStamp; DWORD Reason; DWORD SourceInfo; DWORD SecurityId; DWORD FileAttributes; WORD FileNameLength; WORD FileNameOffset; WCHAR FileName\[1\];
} USN_RECORD_V3, *PUSN_RECORD_V3;
ypedef struct {
USN_RECORD_COMMON_HEADER Header;
FILE_ID_128 FileReferenceNumber;
FILE_ID_128 ParentFileReferenceNumber;
USN Usn;
DWORD Reason;
DWORD SourceInfo;
DWORD RemainingExtents;
WORD NumberOfExtents;
WORD ExtentSize;
USN_RECORD_EXTENT Extents[1];
} USN_RECORD_V4, *PUSN_RECORD_V4; -
Check the
typedef
s of the three structures that fail for mutual non standard members. A candidate is theUSN
member. Do you have adefine
directive using the same name anywhere in your project? If that does not help enable the creation of preprocessor output files. Then you can check what the compiler "sees".