Mail Archives: cygwin/2005/09/06/14:00:34
----Original Message----
>From: Gerrit P. Haase
>Sent: 06 September 2005 18:42
> Andreas wrote:
>
>> Hello,
>>
>> I found a bug in the Cygwin environment that blocks me. I condensed the
>> problem into one C++ file: all.cc
>> I compiles OK, but crashes, when executed.
> $ g++ -Wall -g -o all.C.exe all.C
> all.C: In member function `std::string My::UT_Args::getOptArg(int)':
> all.C:191: error: missing terminating " character
> all.C:192: error: missing terminating " character
> all.C:193: error: `arguments' undeclared (first use this function)
> all.C:193: error: (Each undeclared identifier is reported only once for
> each function it appears in.)
> all.C:193: error: expected `;' before "exit"
> all.C: In function `int main(int, char**)':
> all.C:270: error: missing terminating " character
> all.C:271: error: `Exception' undeclared (first use this function)
> all.C:271: error: expected `;' before '!' token
> all.C:271: error: missing terminating " character
>
> Sorry, cannot compile this...
All those errors are caused by the line-wrapping of the code in Andreas'
post. Adding spurious line-ends to C or C++ source doesn't cause many
problems, but one time it certainly _does_ is when it's in the middle of
quoted text: you aren't allowed to have line-breaks in a quoted string.
Whenever you see lots of 'missing terminating "' errors, that should be the
first thing you look at.
As to the actual problem, Brian D. already found the bug in Andreas' code
on the same day he posted last week.
And the moral of the story?
*Always* send files as attachments, rather than inline, so that they won't
get mangled in this or any other way.
Oh, and the _other_ moral of the story?
http://cygwin.com/acronyms#YSHFRTT!
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -