pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedcompiling c function using MinGW
1+ messages / 1 participants
[nested] [flat]
* compiling c function using MinGW
@ 2009-04-06 13:46 eehab hamzeh <eehab40@hotmail.com>
0 siblings, 0 replies; 1+ messages in thread
From: eehab hamzeh @ 2009-04-06 13:46 UTC (permalink / raw)
To: pgsql-general@postgresql.org
this is how i write the command in MinGW any more direction about I. I am a new user for MinGW
gcc -shared -o hamzeh.dll tt1.o -L "c:/programme/postgresql/8.3/lib" -lpostgres
Thanks
Ihab
>
> 2009/4/6 eehab hamzeh <eehab40@hotmail.com>:
> > Hello
> >
> > I am trying to build some functions using C language. these functions are
> > mentioned in the postgresql documentation.
> >
> > http://www.postgresql.org/docs/8.3/interactive/xfunc-c.html
> >
> > Datum
> > add_one_float8(PG_FUNCTION_ARGS)
> > {
> > /* The macros for FLOAT8 hide its pass-by-reference nature. */
> > float8 arg = PG_GETARG_FLOAT8(0);
> >
> > PG_RETURN_FLOAT8(arg + 1.0);
> > }
> >
> > PG_FUNCTION_INFO_V1(makepoint);
> >
> > Datum
> > makepoint(PG_FUNCTION_ARGS)
> > {
> > /* 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));
> >
> > new_point->x = pointx->x;
> > new_point->y = pointy->y;
> >
> > PG_RETURN_POINT_P(new_
> > point);
> > }
> >
> > the only function that are work are the one with int32 variable.
> > the other function bring errors and are not working
> > any body can give directions
> >
> >
> > kind regards
> > ihab
>
> Re-send to pgsql-general.
>
> Can you paste these errors and how you're compiling this?
>
> --
> Emanuel Calvo Franco
> Sumate al ARPUG !
> (www.postgres-arg.org -
> www.arpug.com.ar)
> ArPUG / AOSUG Member
> Postgresql Support & Admin
_________________________________________________________________
Show them the way! Add maps and directions to your party invites.
http://www.microsoft.com/windows/windowslive/products/events.aspx
^ permalink raw reply [nested|flat] 1+ messages in thread
only message in thread
Thread overview: 1+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-04-06 13:46 compiling c function using MinGW eehab hamzeh <eehab40@hotmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox