Re: Compiling .pgc programs gives error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "mike stanton" <mstanton(at)acsa(dot)cl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Compiling .pgc programs gives error
Date: 2010-02-19 18:30:04
Message-ID: 6775.1266604204@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"mike stanton" <mstanton(at)acsa(dot)cl> writes:
> I have a problem compiling pgc programs with ecpg.
> I always get the following error:

> /usr/local/pgsql/lib/libpgtypes.a(timestamp.o): In function `timestamp2tm':
> timestamp.c:(.text+0x2fc): undefined reference to `rint'

Seems like you need to add "-lm" to your link command. Or consider
linking to libpgtypes.so instead of libpgtypes.a --- .so's generally
carry information about libraries they depend on, which .a's don't.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Fetter 2010-02-19 18:52:35 Re: GROUP BY column alias?
Previous Message mike stanton 2010-02-19 18:14:18 Compiling .pgc programs gives error