From: | Emilio Recio <erecio(at)storm(dot)jmc(dot)tju(dot)edu> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Cannot Statically Link libpq.a |
Date: | 2002-09-25 13:57:28 |
Message-ID: | 3D91C0C8.7050900@storm.jmc.tju.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Gary Knopp | 2002-09-25 16:58:55 | ecpg help |
Previous Message | Emilio Recio | 2002-09-25 13:46:49 | Re: Cannot Statically Link libpq.a |