Re: [SQL] C compiler error when using PostGres

From: "John E(dot) Garrott" <johnga(at)primenet(dot)com>
To: "pgsql-questions(at)postgresql(dot)org" <pgsql-sql(at)postgreSQL(dot)org>
Subject: Re: [SQL] C compiler error when using PostGres
Date: 1998-09-24 20:47:17
Message-ID: 360AAFD5.57A45E56@primenet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"G. Anthony Reina" wrote:
>
> I recently upgraded the hardrive on our database system and copied all
> of the Postgres files from the old harddrive to the new one.
>
> Everything seems to work find except when I try to compile a C program
> that uses SQL backend commands. The program did compile on the old
> harddrive and ran fine. Now, during compilation I get the following
> error:
>
> /database/local/pgsql/lib/libpq.a(fe-auth.o): In function
> `pg_password_sendauth':
> fe-auth.o(.text+0x17): undefined reference to `crypt'
>
> Anyone know how to fix this?
>
> Thanks.
> -Tony
>
> --
>
> ( @@ )
> ////////////////////oOO*(__)*OOo///////////////////////
> // //
> // G. Anthony Reina, MD //
> // The Neurosciences Institute //
> // 10640 John Jay Hopkins Drive //
> // San Diego, CA 92121 USA //
> // //
> // Voice: (619) 626-2000 FAX: (619) 626-2199 //
> // E-mail: reina(at)nsi(dot)edu //
> // //
> ///////////////////////////////////////////////////////

Add -lcrypt to the end of the line that compiles the application.

John

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message G. Anthony Reina 1998-09-24 21:21:16 Re: [SQL] C compiler error when using PostGres
Previous Message G. Anthony Reina 1998-09-24 20:30:58 C compiler error when using PostGres