Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/39088

From BetaArchive Wiki

PRB: C1004: Unexpected EOF


The information in this article applies to:

  • The C/C++ Compiler (CL.EXE), included with:
    • Microsoft C/C++ for MS-DOS, versions 5.1, 6.0, 6.0a, 6.0ax, 7.0
    • Microsoft Visual C++, versions 1.0, 1.5, 1.51'1.52
    • Microsoft C for OS/2


The following error is generated:

C1004: Unexpected end of file found


The above error may be caused by failing to end a line with a <CR>. On pure C-language statements, the compiler ignores white space; however, on statements with directives, a <CR> is needed.

This error occurs if the following include file is used in a program:

   #include <stdio.h><CR>
   #define YES 1<CR>
   #define NO  0 

Without the <CR> after the third line, error C1004 is produced by the compiler.


Make sure each line ends with a <CR>.

NOTE: This problem does not occur with any of the 32-bit compilers.

Additional query words: 1.00 1.50 1.51 1.52 5.10 6.00 6.00a 6.00ax 7.00 8.00

Keywords : kb16bitonly kbCompiler kbprb
Issue type : kbprb
Technology : kbVCsearch kbAudDeveloper kbCVCComp

Last Reviewed: May 8, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.