delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/23/15:30:41

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=BAYES_50,SPF_NEUTRAL
X-Spam-Check-By: sourceware.org
Message-ID: <4A184ED3.70504@aol.com>
Date: Sat, 23 May 2009 12:30:27 -0700
From: Tim Prince <n8tm AT aol DOT com>
Reply-To: tprince AT computer DOT org
User-Agent: Thunderbird 2.0.0.19 (X11/20081227)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Static linking issue under cygwin.
References: <4f8dccd00905231221v2f82acb9rcf1ffa9f228650be AT mail DOT gmail DOT com>
In-Reply-To: <4f8dccd00905231221v2f82acb9rcf1ffa9f228650be@mail.gmail.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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
> pgtest.c
> /cygdrive/c/DOCUME~1/vap/LOCALS~1/Temp/cclXAlCk.o:pgtest.c:(.text+0x33):
> 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
Files"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019