Article View: ch.comp.os.linux
Article #18105Re: gnu c Compiler Problem
From: dz
Date: Sun, 16 Apr 2000 00:00
Date: Sun, 16 Apr 2000 00:00
39 lines
2209 bytes
2209 bytes
Danke Marc, ich habs gefunden... Der Quellcode muss zuerst mit dos2unix von den <CR><LF> 'befreit' werden. Jetzt l�uft mein Program. Gruss Daniel "Marc SCHAEFER" <schaefer@alphanet.ch> wrote in message news:8dblsu$ht3$1@vulcan.alphanet.ch... > dz <zupp_XinXger@freXe_surfX.ch> wrote: > > : Der Compiler gcc akzeptiert den Backslash in Marcros nicht. Gem�ss > > Of course it does. > > #define SOMETHING abcd \ > truc \ > last line here > > However, the standard explicitely prohibits anything after the \. > > The error you get is probably: > > schaefer@defian:/tmp% gcc truc.c > truc.c:2: stray '\' in program > truc.c:3: parse error before `last' > > Your problem is that your lines do not finish at the \, since your > MS-* format text files have a ^M at the end. This is non standard > and won't work. You must first remove all the ^M from all the > files. End of line is LF (linefeed, ^J), nothing else. > > (BTW: on UNIX, opening a file with stdio's fopen with "r" or with "rb" > is equivalent, as is with "w" and "wb". This is a known problem > when porting from UNIX to MS-*. The MS-* native compilers MUST > now the file is "b"inary so that they don't remove the ^Ms. > Yes, the MS-* native compilers, when processing text files, > are *obliged* to remove the final ^M for C-standard > conformance. This is only one of the numerous MS-* environment > annoyances when attempting to use standards.) >
Technical Details
Message-ID:
<8dc15o$99d$1@hs1b01h02-0.dplanet.ch>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<8dagtk$mac$1@hs1b01h02-0.dplanet.ch> <8dblsu$ht3$1@vulcan.alphanet.ch>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f4b73,936da979a726e211 X-Google-Attributes: gidf4b73,public From: "dz" <zupp_XinXger@freXe_surfX.ch> Subject: Re: gnu c Compiler Problem Date: 2000/04/16 Message-ID: <8dc15o$99d$1@hs1b01h02-0.dplanet.ch> X-Deja-AN: 611789724 References: <8dagtk$mac$1@hs1b01h02-0.dplanet.ch> <8dblsu$ht3$1@vulcan.alphanet.ch> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Complaints-To: usenet@dplanet.ch X-Trace: hs1b01h02-0.dplanet.ch 955877368 9517 212.35.53.141 (16 Apr 2000 09:29:28 GMT) Organization: diAx dplanet (postings do not reflect the views of diAx) X-MSMail-Priority: Normal NNTP-Posting-Date: 16 Apr 2000 09:29:28 GMT Newsgroups: ch.comp.os.linux