Received: from smtp01.primenet.com (daemon@smtp01.primenet.com [206.165.6.131]) by hub.org (8.8.8/8.8.8) with ESMTP id RAA25603 for ; Thu, 24 Sep 1998 17:00:11 -0400 (EDT) (envelope-from johnga@primenet.com) Received: (from daemon@localhost) by smtp01.primenet.com (8.8.8/8.8.8) id OAA26345 for ; Thu, 24 Sep 1998 14:00:08 -0700 (MST) Received: from ip218.sea.primenet.com(206.165.192.218), claiming to be "primenet.com" via SMTP by smtp01.primenet.com, id smtpd026314; Thu Sep 24 14:00:02 1998 Sender: jeg@primenet.com Message-ID: <360AAFD5.57A45E56@primenet.com> Date: Thu, 24 Sep 1998 13:47:17 -0700 From: "John E. Garrott" X-Mailer: Mozilla 4.5b2 [en] (X11; I; Linux 2.0.35 i586) X-Accept-Language: en MIME-Version: 1.0 To: "pgsql-questions@postgresql.org" Subject: Re: [SQL] C compiler error when using PostGres References: <360AAC02.46F2B123@nsi.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit "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@nsi.edu // > // // > /////////////////////////////////////////////////////// Add -lcrypt to the end of the line that compiles the application. John