chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] chicken-defaults.h error newline in constant


From: Brandon J. Van Every
Subject: [Chicken-hackers] chicken-defaults.h error newline in constant
Date: Sun, 11 Feb 2007 22:11:00 -0800
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

I'm getting numerous errors in the CMake MSVC build of the form:

------ Build started: Project: libchicken-boot, Configuration: Release Win32 ------

Compiling...
utils.c
e:\devel\vs71\chicken\boot\chicken-defaults.h(42) : error C2001: newline in constant


Anyone tweak how chicken-defaults.h is generated?  The Microsoft docs say:

Microsoft C++ Language Reference for eMbedded Visual C++

Compiler Error C2001newline in constant
A string constant cannot be continued on a second line unless you:
End the first line with a backslash.
Close the string on the first line with a double quotation mark and open the string on the next line with another double quotation mark.
Ending the first line with \n is not sufficient. For example:
printf("Hello,             // error
   world");
printf("Hello,\n          //  error
   world");
printf("Hello,\           //  OK
world");
printf("Hello,"            // OK
   " world");
Spaces at the beginning of the next line after a line-continuation character are included in the string constant. None of the examples shown above embed a newline character into the string constant. You can embed a newline character as shown here:
printf("Hello,\n\
world");
printf("Hello,\
\nworld");
printf("Hello,\n"
   "world");
printf("Hello,"
"\nworld");


Cheers,
Brandon Van Every






reply via email to

[Prev in Thread] Current Thread [Next in Thread]