Re: c function - undefined symbols

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: c function - undefined symbols
Дата
Msg-id D960CB61B694CF459DCFB4B0128514C202D67B57@exadv11.host.magwien.gv.at
обсуждение исходный текст
Ответ на c function - undefined symbols  (Steffn <steffn@gmx.at>)
Список pgsql-general
Steffn wrote:
> 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?

I guess that the include path you need is /Library/PostgreSQL/8.3/include/server.

Where in the documentation did you find the path?
I read the following in
http://www.postgresql.org/docs/8.3/static/xfunc-c.html#AEN40954

 "Use pg_config --includedir-server to find out where the
  PostgreSQL server header files are installed on your system"

What is the result of "pg_config --includedir-server" for you?

Yours,
Laurenz Albe

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

Предыдущее
От: Mark Morgan Lloyd
Дата:
Сообщение: Getting text into a table
Следующее
От: "Alexander Farber"
Дата:
Сообщение: 8.2.6 -> 8.1.11: syntax error at or near "OWNED BY"