This is the wrong list for this question; it is not related to MSYS. You
should be using the MinGW-users list.
On Monday 30 March 2009 20:46:03 eehab hamzeh wrote:
> /* Here, the pass-by-reference nature of Point is not hidden. */
> Point *pointx = PG_GETARG_POINT_P(0);
> Point *pointy = PG_GETARG_POINT_P(1);
> Point *new_point = (Point *) palloc(sizeof(Point));
> the error
> in function 'makepoint':
> error: 'Point' undeclared (first use in this function)
> error: (each undeclared identifier is reported only one
> error: for each function it appears in.)
This pretty much says it all; the compiler has no idea what a `Point' is.
*You* have to tell it, by an appropriate typedef, of by including some
header which contains such a typedef.
> error: 'pointx' undeclared (first use in ´this function)
> error: 'pointy' undeclared (first use in his fnction)
> error 'new_point' undeclared (first use in his function)
> error: syntax error befre ')' oken
These are consequences of the above.
> in function 'copy text':
> error: 'invalid lvalue in assinment
The entity on the LHS of an assignment operator, (equals sign), isn't
something you can assign a value to; I suspect:
> VARATT_SIZEP(new_t) = VARSIZE(t);
is the offending statement.
> In function 'concat_text'
> error: invalid lvalue in assignement
Same again; I suspect:
> VARATT_SIZEP(new_text) = new_text_size;
In both of these cases, it may be that the macro VARATT_SIZEP should
expand to a valid lvalue, but the compiler doesn't know this, (because
you are missing a required header), so it interprets those references as
function calls, which are not valid in this context.
> warning no new line at end of file
Your source file is not properly structured; there is no line terminator
at the end of the last line. This is not allowed by the C/C++ standards.
This is your second or third time of asking this question, and it had been
partially answered already. Perhaps you should look for a good beginners
reference for C/C++ programming.
Also, when you post an error transcript, you should copy and paste it; it
is fairly obvious that you didn't, because the compiler doesn't make the
myriad spelling errors seen here, and it usually also includes line
numbers, to pinpoint the location of errors. You should also reduce your
sample code to a minimal, self-contained, fully compilable test case; I
can't compile your example, so I can't help you further.
And finally, please stop posting multipart MIME, with an embedded HTML
copy of your text cluttering our bandwidth; if you can't say what you
need to, in plain text only, then you have nothing worth saying.