Skip site navigation (1) Skip section navigation (2)

c function - undefined symbols

From: Steffn <steffn(at)gmx(dot)at>
To: pgsql-novice(at)postgresql(dot)org
Subject: c function - undefined symbols
Date: 2008-12-04 11:29:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Sorry in case of double posting, wasn't registered when I tried it the 
first time!


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 <>. 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!

Environment used:
OS X 10.5.5
XCode 3.1
Postgres 8.3.4

pgsql-novice by date

Next:From: Lee, MijaDate: 2008-12-04 16:34:20
Subject: pg_dump usage of /tmp
Previous:From: Bruce MomjianDate: 2008-12-03 23:24:10
Subject: Re: Seeking impressions on "The Postgresql Reference Manual" - Volumes 1, 2 & 3

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group