Export (0) Print
Expand All
Expand Minimize

Compiler Warning C4335

Error Message

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 Mac style (‘\r’) as opposed to UNIX (‘\n’) or DOS (‘\r\n’).

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

One way to generate files in Mac format would be by using the Advanced Save Options (File menu) in Visual Studio.

Example

The following sample generates C4335.

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

Community Additions

ADD
Show:
© 2014 Microsoft