Using the latest version of the Microsoft Compiler (included with the Win7 SDK), I'm attempting to compile a source file that's encoded using UTF-8 with unicode line separators.
Unfortunately, the code will not compile -- even if I include the UTF-8 signature at the start of the file. For example, if I try to compile this:
#include <stdio.h>
int main (void)
{
printf("Hello!");
return 0;
}
I'll see the following error:
Prompt> cl test.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.
test.c test.c(1) : warning C4067: unexpected tokens following preprocessor directive - expected a newline Microsoft (R) Incremental Linker Version 9.00.30729.01 Copyright (C) Microsoft Corporation. All rights reserved.
/out:test.exe test.obj LINK : fatal error LNK1561: entry point must be defined
Has anyone encountered this problem before? Any solutions?
Thanks! Andrew