Problems compiling a trigger

From: Rodolfo Campos <camposer(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Problems compiling a trigger
Date: 2006-02-07 23:45:58
Message-ID: 140c63030602071545g5a60ca7aoed549a093422aa69@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi fellows,

I'm getting problems compiling a trigger written in C (exactly the one from
the documentation), when compiling it I get the errore shwoned here.

I think the problem might be the linker, but I don't know how to fix it.

The command that I run was:

gcc -I /usr/include/postgresql/server prueba1.c

And here is the error:

/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): En la función
`_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
/tmp/cc4DCNL5.o(.text+0x56): En la función `trigf':
: undefined reference to `errstart'
/tmp/cc4DCNL5.o(.text+0x6a): En la función `trigf':
: undefined reference to `elog_finish'
/tmp/cc4DCNL5.o(.text+0xd9): En la función `trigf':
: undefined reference to `SPI_connect'
/tmp/cc4DCNL5.o(.text+0x106): En la función `trigf':
: undefined reference to `errstart'
/tmp/cc4DCNL5.o(.text+0x128): En la función `trigf':
: undefined reference to `elog_finish'
/tmp/cc4DCNL5.o(.text+0x13c): En la función `trigf':
: undefined reference to `SPI_exec'
/tmp/cc4DCNL5.o(.text+0x169): En la función `trigf':
: undefined reference to `errstart'
/tmp/cc4DCNL5.o(.text+0x18b): En la función `trigf':
: undefined reference to `elog_finish'
/tmp/cc4DCNL5.o(.text+0x19f): En la función `trigf':
: undefined reference to `SPI_tuptable'
/tmp/cc4DCNL5.o(.text+0x1ab): En la función `trigf':
: undefined reference to `SPI_tuptable'
/tmp/cc4DCNL5.o(.text+0x1b8): En la función `trigf':
: undefined reference to `SPI_getbinval'
/tmp/cc4DCNL5.o(.text+0x1e1): En la función `trigf':
: undefined reference to `errstart'
/tmp/cc4DCNL5.o(.text+0x203): En la función `trigf':
: undefined reference to `elog_finish'
/tmp/cc4DCNL5.o(.text+0x208): En la función `trigf':
: undefined reference to `SPI_finish'
/tmp/cc4DCNL5.o(.text+0x22f): En la función `trigf':
: undefined reference to `SPI_getbinval'
collect2: ld devolvió el estado de salida 1

I'm running Debian-Sarge and I have postgresql, postgresql-dev,
postgresq-contrib packakes with gcc3.3, gcc3.3-base and libc6 installed on
my machine.

Any help that you can bring to me should be very helpfuly. Thanks in
advance,

Rodolfo.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Browne 2006-02-08 00:04:32 Re: sql row constructor...works!
Previous Message Tom Lane 2006-02-07 22:09:30 Re: TODO-Item: B-tree fillfactor control