Static linking issue under cygwin.
Sat May 23 19:30:00 GMT 2009
Vladimir A. Petrov wrote:
> I've faced with strange static linking issue in Cygwin environment.
> Trivial C program can not be linked against PostgreSQL libpq with the
> following diagnostics:
> $ gcc -Wall -I /cygdrive/c/Program\ Files/PostgreSQL/8.2/include/ -L
> /cygdrive/c/Program\ Files/PostgreSQL/8.2/lib -lpq -o pgtest.exe
> undefined reference to `_PQconnectdb'
Not strange, when gnu ld depends on order of libraries for static linking.
ld doesn't rescan libraries when new references are added after the scan.
It's strange enough to attempt to link libraries installed under "Program
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
More information about the Cygwin