Re: Compiling .pgc programs gives error - Mailing list pgsql-general

From Tom Lane
Subject Re: Compiling .pgc programs gives error
Date
Msg-id 6775.1266604204@sss.pgh.pa.us
Whole thread Raw
In response to Compiling .pgc programs gives error  ("mike stanton" <mstanton@acsa.cl>)
List pgsql-general
"mike stanton" <mstanton@acsa.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

pgsql-general by date:

Previous
From: "mike stanton"
Date:
Subject: Compiling .pgc programs gives error
Next
From: David Fetter
Date:
Subject: Re: GROUP BY column alias?