Re: [PORTS] Port Bug Report: compile errors for embedded sql (in c) - Mailing list pgsql-ports

From Bruce Momjian
Subject Re: [PORTS] Port Bug Report: compile errors for embedded sql (in c)
Date
Msg-id 199906020106.VAA09180@candle.pha.pa.us
Whole thread Raw
In response to Port Bug Report: compile errors for embedded sql (in c)  (Unprivileged user <nobody>)
List 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@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

pgsql-ports by date:

Previous
From: Unprivileged user
Date:
Subject: Port Bug Report: Insertion of line return character inconsistent.
Next
From: Sum Wu
Date:
Subject: Installation of Postgres v6.4.2