converting windows source to gcc

Tim Prince tprince@computer.org
Wed Apr 12 19:22:00 GMT 2000


That's for sure, you need to clean out the \r characters from your source
files in order to run gcc, even on Windows.  ftp programs generally have an
ascii or text mode which does this when transferring Windows to Unix.  It's
useful to have a Windows text editor which gives you the option of saving
files in "unix" format.  Then there are typical editor commands, such as in
ex :%s/^V^M$//
i.e. remove all ^M characters appearing at line ends.  You may also have
little filters already in place such as dos2unix.

----- Original Message -----
From: "Bill Waterston" <bill.waterston@collectionhouse.com.au>
To: "'bug-gcc@prep.ai.mit.edu'" <bug-gcc@gnu.org>
Sent: Wednesday, April 12, 2000 6:08 PM
Subject: FW: converting windows source to gcc


>
>
> >  -----Original Message-----
> > From: Bill Waterston
> > Sent: Friday, April 07, 2000 12:02 PM
> > To: 'help-gcc-request@gnu.org'
> > Subject: converting windows source to gcc
> >
> > Hi, I am a new user of gnu, running under Solaris. I have written a
simple
> > program in windows (compiled using Borland C++ Builder 5) which compiles
> > and runs correctly. I transferred the file to our Sun workstation and
> > tried to compile it using our newly set up gnu compiler (command used is
> > "gcc nonul.c"). I am getting heaps of errors that didn't exist in my
> > windows program. I have a feeling that some of the errors are to do with
> > the file format, ie carriage returns or linefeeds or something.
> >
> > source file is attached, errors listed below....
> >
> >  <<nonul.c>>
> >
> > Could you help with either one or both of the following?
> >
> > 1. give me an idea of what these errors are and how to fix them
> > 2. I have most of the documentation for gnu (make, automake, extensions)
> > but I cannot find anywhere any documents that talk about compiler error
> > messages and what they mean, can you direct me to such documentation.
> >
> > Thanks,
> > Bill Waterston, Brisbane Australia.
> >
> > Errors follow....
> >
> > nonul.c: In function `main':
> > nonul.c:15: parameter `showUsage' is initialized
> > nonul.c:15: parameter `showProgress' is initialized
> > nonul.c:15: parameter `paramNum' is initialized
> > nonul.c:21: parse error before `if'
> > nonul.c:15: parm types given both in parmlist and separately
> > nonul.c:22: `paramNum' undeclared (first use this function)
> > nonul.c:22: (Each undeclared identifier is reported only once
> > nonul.c:22: for each function it appears in.)
> > nonul.c:23: `showProgress' undeclared (first use this function)
> > nonul.c: At top level:
> > nonul.c:26: parse error before `else'
> > nonul.c:41: warning: data definition has no type or storage class
> > nonul.c:42: parse error before `}'
> >
> > nonul.c:48: parse error before `['
> >
> > nonul.c:48: warning: data definition has no type or storage class
> >
> > nonul.c:49: parse error before string constant
> >
> > nonul.c:49: warning: data definition has no type or storage class
> >
> > nonul.c:50: warning: parameter names (without types) in function
> > declaration
> > nonul.c:50: warning: data definition has no type or storage class
> >
> > nonul.c:51: warning: data definition has no type or storage class
> >
> > nonul.c:52: parse error before `}'
> >
> > nonul.c:58: parse error before string constant
> >
> > nonul.c:58: warning: data definition has no type or storage class
> >
> > nonul.c:62: warning: parameter names (without types) in function
> > declaration
> > nonul.c:62: warning: data definition has no type or storage class
> >
> > nonul.c:63: parse error before string constant
> >
> > nonul.c:63: warning: data definition has no type or storage class
> >
> > nonul.c:64: warning: parameter names (without types) in function
> > declaration
> > nonul.c:64: warning: data definition has no type or storage class
> >
> > nonul.c:65: redefinition of `showUsage'
> >
> > nonul.c:51: `showUsage' previously defined here
> >
> > nonul.c:65: warning: data definition has no type or storage class
> >
> > nonul.c:66: warning: parameter names (without types) in function
> > declaration
> > nonul.c:66: warning: data definition has no type or storage class
> >
> > nonul.c:67: parse error before `}'
> >
> > nonul.c:75: parse error before string constant
> >
> > nonul.c:75: warning: data definition has no type or storage class
> >
> > nonul.c:76: parse error before string constant
> >
> > nonul.c:76: warning: data definition has no type or storage class
> >
> > nonul.c:77: parse error before string constant
> >
> > nonul.c:77: warning: data definition has no type or storage class
> >
> > nonul.c:78: parse error before string constant
> >
> > nonul.c:78: warning: data definition has no type or storage class
> >
> > nonul.c:79: parse error before string constant
> >
> > nonul.c:79: warning: data definition has no type or storage class
> >
> > nonul.c:80: warning: unknown escape sequence `\A'
> >
> > nonul.c:80: parse error before string constant
> >
> > nonul.c:80: warning: data definition has no type or storage class
> >
> > nonul.c:85: `ifp' undeclared here (not in a function)
> >
> > nonul.c:85: initializer element is not constant
> >
> > nonul.c:85: warning: data definition has no type or storage class
> >
> > nonul.c:86: parse error before `0'
> >
> > nonul.c:86: warning: data definition has no type or storage class
> >
> > nonul.c:87: initializer element is not constant
> >
> > nonul.c:87: warning: data definition has no type or storage class
> >
> > nonul.c:88: parse error before `if'
> >
> > nonul.c:92: warning: data definition has no type or storage class
> >
> > nonul.c:93: parse error before `}'
> >
> > nonul.c:95: `ifp' undeclared here (not in a function)
> >
> > nonul.c:95: initializer element is not constant
> >
> > nonul.c:95: warning: data definition has no type or storage class
> >
> >
> > and there is more, but you get the idea.....
> >
>



More information about the Gcc-bugs mailing list