c function - undefined symbols

Поиск
Список
Период
Сортировка
От Steffn
Тема c function - undefined symbols
Дата
Msg-id 493F8E67.4060700@gmx.at
обсуждение исходный текст
Ответы Re: c function - undefined symbols  (Richard Huxton <dev@archonet.com>)
Re: c function - undefined symbols  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
I already asked this question on the psql-novice list, but didn't get
any reply. I am aware that this is probably a basic question and hope
someone here can point me in the right direction!

Hi!

I am currently trying my first steps in writing my own functions in C. I
read through the documentation and tried the most simple examples as
shown in <http://www.postgresql.org/docs/8.3/static/xfunc-c.html>. Sadly
this was already the point where I stumbled. I luckily compiled and
tested the add_one integer variant. But as soon as I added the
add_one_float8 I couldn't link no more. My linker dies with.

Undefined symbols:
"_Float8GetDatum", referenced from:
    _add_one_float8 in foo.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Following the documentation I only added
"/Library/PostgreSQL/8.3/include/**" to my header search path. What else
do I need to configure?

Thanks for your help!
steffn

Environment used:
OS X 10.5.5
XCode 3.1
Postgres 8.3.4

Same behavior under WinXP and Ubuntu. So IMHO I am clearly missing a
point on configuring my build environment.

В списке pgsql-general по дате отправления:

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: PostgreSQL and eval()
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: c function - undefined symbols