openFramework in VisualStudio: “error C2001: newline in constant” or “IntelliSense: too many characters in character constant” error

04Dec

When compiling the examples in the openFramework, if you encounter the below errors:

“IntelliSense: too many characters in character constant …icons.h” or

error C2001: newline in constant (see below Fig.1)

Fig.1

The most likely reason is that you are using a non-English Windows or in the regional setting (from control panel =>Regional language => Adminstrative => System locale), the non-unicode language is not English. Double click the above errors in the C2001 error shows the details, as shown in Fig.2

Fig.2

To troubleshoot this, use this icons.h to overwrite the original file in the corresponding file. Download it here.