GCC compiler error messages.


This is a list of compiler error messages I have hit and the method used to clear them.


warning: comparison between pointer and integer
Maybe OK. This was generated from 'if (strstr(line,"word") != NULL )' strstr returns NULL or pointers, I was only interested in the fact that a string had been found, not where it was.


`floppyto.c:782: parse error at end of input
floppyto.c is the program name, 782 is the line number but it is one greater then the file length. This is because of unbalanced {} or unbalanced comments /* */


parse error before `printf'
Missing ; before this statement.


Segmentation error.
You have attempted to access protected storage or overwritten something important!


subscripted value is neither array nor pointer
Attempted to subscript a scalar variable.


`j' undeclared (first use this function)
Declare the variable.


/usr/lib/crt0.o: Undefined symbol _main referenced from text segment
Generated when main() is missing. I have seen this twice.
  1. When there was a syntax error in an included header file.
  2. And when the C source file was missing in the gcc command!


Undefined symbol _initscr referenced from text segment
Called a function but have not supplied it or the library that contains it with an #include statement.


unterminated `#if' conditional
#endif preprocessor required.


warning: passing arg 1 of `cpystr' makes integer from pointer
without a cast
This is the code causing the problem:
void cpystr( char item);
main()
{
   char src[]="martin leslie";
   cpystr(src);
}
   cpystr(char item)
{
}
It should be....
void cpystr( char item[]);
main()
{
   char src[]="martin leslie";
   cpystr(src);
}
   cpystr(char item[])
{
}


conflicting types for `Alex'
previous declaration of `Alex'
Alex has been declared in two enum statements. Here is the code


parse error before `1'
At top level:
warning: data definition has no type or storage class
parse error before string constant
warning: data definition has no type or storage class
There is a conflict between enum and #define statements. Here is the code


Top Master Index Keywords Functions


Martin Leslie

config?id=ebf6c9cb23d7e56eec8575a88071dec97ad5c6e2'>Collapse)AuthorFilesLines