none
error C2143: syntax error : missing ';' before '}'

    Question

  • Two projects include the same header stdio.h but one results in C2143 errors while the other does not as illustrated below. Can anyone point me in the right direction to resolve the errors. I believe it has something to do with my header file globals.h but I haven't been able to detect any differences between the two versions of globals.h.

     

    1>------ Build started: Project: ReSource3, Configuration: Debug Win32 ------
    1>Compiling...
    1>AANALYZE.C
    1>Note: including file: c:\resource3\defines.h
    1>Note: including file: c:\resource3\structs.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h
    1>Note: including file:     c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtassem.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vadefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\limits.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\resource3\globals.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\swprintf.inl(43) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\swprintf.inl(51) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\swprintf.inl(67) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\swprintf.inl(75) : error C2143: syntax error : missing ';' before '}'
    1>Note: including file: c:\resource3\protos.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wtime.inl
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\wtime.inl(50) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\wtime.inl(56) : error C2143: syntax error : missing ';' before '}'
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.inl
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(86) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(92) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(98) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(105) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(111) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(118) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(123) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(127) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(131) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\time.inl(135) : error C2143: syntax error : missing ';' before '}'
    1>Note: including file:  c:\resource3\GUIAPI.H
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\ctype.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\errno.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\string.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\string.h(86) : error C2143: syntax error : missing ';' before '}'
    1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\string.h(259) : error C2143: syntax error : missing ';' before '}'
    1>Note: including file: c:\resource3\required.h
    1>Note: including file: c:\resource3\pragma.c
    1>Build log was saved at "file://c:\Users\Fred\Documents\Visual Studio 2008\Projects\ReSource3\ReSource3\Debug\BuildLog.htm"
    1>ReSource3 - 18 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
     
     
    1>------ Build started: Project: ReSource, Configuration: Debug Win32 ------
    1>Compiling...
    1>Aanalyze.c
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\defines.h
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\structs.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdlib.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\sal.h
    1>Note: including file:     c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtassem.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\vadefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\limits.h
    1>Note: including file:    c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\globals.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\stdio.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\swprintf.inl
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\protos.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\wtime.inl
    1>Note: including file:   c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\time.inl
    1>Note: including file:  c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\GUIAPI.H
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\ctype.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\errno.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\string.h
    1>Note: including file:  c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\crtdefs.h
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\required.h
    1>Note: including file: c:\users\fred\documents\visual studio 2008\projects\resource\resource\resource\pragma.c
    1>Build log was saved at "file://c:\Users\Fred\Documents\Visual Studio 2008\Projects\ReSource\ReSource\ReSource\Debug\BuildLog.htm"
    1>ReSource - 0 error(s), 0 warning(s)
    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

    Wednesday, August 01, 2012 5:54 AM

Answers

All replies