Patrick Welche wrote:
> Very long shot: what if you move the -lpq to the end?
>
> gcc -o testpq -static testpq.c -lpq
YOU ROCK!
erecio@datacollector1:$ make
gcc -static -o testpg -L. testpg.o -lpq
./libpq.a(fe-auth.o): In function `pg_password_sendauth':
fe-auth.o(.text+0x148): undefined reference to `crypt'
collect2: ld returned 1 exit status
make: *** [pgconn] Error 1
-- after editing the makefile
$ make
gcc -static -o testpg -L. testpg.o -lpq -lcrypt
strip testpg && size testpg text data bss dec hex filename 437341 11488 165800 614629 960e5
pgconn
$ ldd testpg not a dynamic executable
I've been away from C for too long... QT has pampered me and PHP has
made me lazy. Java well... has made me take everything for granted. :)
Hopefully this list is archived so someone else doesn't make that same
'oops'. Thanks a lot.
~Elmo