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

Re: C program compilation

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: "Gustavo R(dot) Bonet" <gbonet(at)bna(dot)com(dot)ar>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: C program compilation
Date: 2000-10-27 22:15:12
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
* Gustavo R. Bonet <gbonet(at)bna(dot)com(dot)ar> [001027 14:54] wrote:
> I'm a beginner in PostGreSQL and I'm trying to meka my first interface with
> a C
> program.
> Like the documentation says, I'm using the following sentence to compile:
> gcc -o output_name -I /usr/include/pgsql -lpq myprogram.c
> But, in two diferent Linux servers the answer was:
> /usr/lib/ undefined reference to `crypt'
> collect2: ld returned 1 exit status

try adding '-lcrypt' to the compile flags.

-Alfred (who also stumbled on this)

In response to

pgsql-interfaces by date

Next:From: The Hermit HackerDate: 2000-10-27 22:53:02
Subject: Re: List archive, getBigDecimal()
Previous:From: Luc BouchardDate: 2000-10-27 16:12:56
Subject: Re: Re: new maintainer for the ODBC driver?

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