Compiler Warning C4335

Mac file format detected: please convert the source file to either DOS or UNIX format

The line termination character of the first line of a source file is Macintosh style ('\r') as opposed to UNIX ('\n') or DOS ('\r\n').

This warning is always issued as an errror. See warning pragma for information about how to disable this warning. Also, this warning is only issued once per compiland. Therefore, if there are multiple #include directives that specify files in Macintosh format, C4335 will only be issued once.

One way to generate files in Macintosh format is by using the Advanced Save Options (on the File menu) in Visual Studio.


The following sample generates C4335.

// C4335 expected
#include "c4335.h"   // assume both include files are in Macintosh format
#include "c4335_2.h"