FW: converting windows source to gcc
Bill Waterston
bill.waterston@collectionhouse.com.au
Wed Apr 12 18:11:00 GMT 2000
> -----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.....
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nonul.c
Type: text/x-c
Size: 4504 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20000412/b3fa4b55/attachment.bin>
More information about the Gcc-bugs
mailing list