Re: [PORTS] Port Bug Report: compile errors for embedded sql (in c)

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: Nathan <nathan(at)khmere(dot)com>
Cc: pgsql-ports(at)postgreSQL(dot)org
Subject: Re: [PORTS] Port Bug Report: compile errors for embedded sql (in c)
Date: 1999-06-02 01:06:28
Message-ID: 199906020106.VAA09180@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

> I get this error when I complie ?
> (I am not a new 'c' programmer but I am new to embedded sql)
> /usr/lib/libecpg.so: undefined reference to `crypt'
> collect2: ld returned 1 exit status
>
> --------------------------------------------------------------------------
>
> Test Case:
> ----------
> This is what I use to compile
> gcc -g -o 2easql 2easql.c -I /usr/include/pgsql/
> -L /usr/include/pgsql/lib -lecpg -lpq

Do this:

gcc -g -o 2easql 2easql.c -I /usr/include/pgsql/
-L /usr/include/pgsql/lib -lecpg -lpq -lcrypt
^^^^^^^

--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-ports by date

  From Date Subject
Next Message Sum Wu 1999-06-02 04:16:06 Installation of Postgres v6.4.2
Previous Message Unprivileged user 1999-06-02 00:28:28 Port Bug Report: Insertion of line return character inconsistent.