C++:文件格式错误
C++ : File format error
在使用 vs 2005 编译 c++ 代码时,出现以下 mac 文件格式相关错误。对于这个特定错误,我在互联网上找不到任何参考。有人可以帮我解决这个问题吗?
错误 C4335:检测到 Mac 文件格式:请将源文件转换为 DOS 或 UNIX 格式
未定义 WINVER。默认为 0x0502(Windows Server 2003)
根据 MSDN:
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’).
因此只需更改文件的行尾即可。为此,请转到 File -> Advanced Save Options -> Set line endings to Windows
.
在使用 vs 2005 编译 c++ 代码时,出现以下 mac 文件格式相关错误。对于这个特定错误,我在互联网上找不到任何参考。有人可以帮我解决这个问题吗?
错误 C4335:检测到 Mac 文件格式:请将源文件转换为 DOS 或 UNIX 格式 未定义 WINVER。默认为 0x0502(Windows Server 2003)
根据 MSDN:
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’).
因此只需更改文件的行尾即可。为此,请转到 File -> Advanced Save Options -> Set line endings to Windows
.