From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31854 invoked by alias); 11 Nov 2012 20:41:42 -0000 Received: (qmail 31845 invoked by uid 22791); 11 Nov 2012 20:41:42 -0000 X-SWARE-Spam-Status: No, hits=-0.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nm24-vm4.bullet.mail.ne1.yahoo.com (HELO nm24-vm4.bullet.mail.ne1.yahoo.com) (98.138.91.184) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 11 Nov 2012 20:41:37 +0000 Received: from [98.138.90.49] by nm24.bullet.mail.ne1.yahoo.com with NNFMP; 11 Nov 2012 20:41:36 -0000 Received: from [98.138.89.196] by tm2.bullet.mail.ne1.yahoo.com with NNFMP; 11 Nov 2012 20:41:36 -0000 Received: from [127.0.0.1] by omp1054.mail.ne1.yahoo.com with NNFMP; 11 Nov 2012 20:41:36 -0000 Received: (qmail 42322 invoked by uid 60001); 11 Nov 2012 20:41:36 -0000 Received: from [212.255.22.91] by web120105.mail.ne1.yahoo.com via HTTP; Sun, 11 Nov 2012 12:41:36 PST X-Rocket-MIMEInfo: 001.001,R29kLCB5b3UgZ3V5cyBhcmUgZmFzdCEKCk9rYXksIEkgdHJpZWQgdGhhdCwgYW5kIHRoZW4gaXQgY2FtZSB1cCB3aXRoIC0gZmlyc3QsIHRoZSBwdGhyZWFkIGxpYnJhcnkgd2FzIG1pc3NpbmcsIGFuZCB0aGVuIHdoZW4gSSBhZGRlZCAtbHB0aHJlYWQgKG1heWJlIHRoZSBkeW5hbWljIHZlcnNpb24gaGFkIGJyb3VnaHQgdGhhdCBpbj8pIC0gdGhlc2Ugd2VyZSBtaXNzaW5nOgovaG9tZS9tZS9vcHQvbGliL2xpYnNxbGl0ZTMuYShzcWxpdGUzLm8pOiBJbiBmdW5jdGlvbiBgdW5peERsRXJyb3InOgovaG9tZS8BMAEBAQE- Message-ID: <1352666496.38189.YahooMailClassic@web120105.mail.ne1.yahoo.com> Date: Sun, 11 Nov 2012 20:41:00 -0000 From: Charles Smith Subject: Re: probably an old question about overriding hardcoded library search paths To: gcc-help@gcc.gnu.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2012-11/txt/msg00059.txt.bz2 God, you guys are fast! Okay, I tried that, and then it came up with - first, the pthread library w= as missing, and then when I added -lpthread (maybe the dynamic version had = brought that in?) - these were missing: /home/me/opt/lib/libsqlite3.a(sqlite3.o): In function `unixDlError': /home/me/opt/sqlite-3.6.19/sqlite3.c:25735: undefined reference to `dlerror' /home/me/opt/lib/libsqlite3.a(sqlite3.o): In function `unixDlSym': /home/me/opt/sqlite-3.6.19/sqlite3.c:25762: undefined reference to `dlsym' /home/me/opt/lib/libsqlite3.a(sqlite3.o): In function `unixDlClose': /home/me/opt/sqlite-3.6.19/sqlite3.c:25766: undefined reference to `dlclose' /home/me/opt/lib/libsqlite3.a(sqlite3.o): In function `unixDlOpen': /home/me/opt/sqlite-3.6.19/sqlite3.c:25721: undefined reference to `dlopen' I added -ldl and it then linked. Funny. I guess the dynamic version of sqlite provides those, but my other = shared libraries don't? --- On Sun, 11/11/12, Marc Glisse wrote: > From: Marc Glisse > Subject: Re: probably an old question about overriding hardcoded library = search paths > To: "Charles Smith" > Cc: gcc-help@gcc.gnu.org > Date: Sunday, November 11, 2012, 12:30 PM > On Sun, 11 Nov 2012, Charles Smith > wrote: >=20 > > I confess I'm confused. > > > > I thought that it worked, but now it's not working any > more: > > > > g++ \ > >=A0 =A0 =A0 =A0 -L"/home/me/dir1" \ > >=A0 =A0 =A0 =A0 -L"/home/me/dir2" \ > >=A0 =A0 =A0 =A0 -L"/home/me/dirn" \ > >=A0 =A0 =A0 =A0 > /home/me/opt/lib/libsqlite3.a \ > >=A0 =A0 =A0 =A0 -o > "FLAT"=A0=A0=A0./a.o ./b.o=A0 =A0 -llib1 > -llib2 -llibn > > /home/me/dir2/liblib2.a(layer.o): In function > `Entity::get_ip_config(char*)': > > /home/me/a.cc:86: undefined reference to > `sqlite3_open_v2' >=20 > If A depends on B, put -lA before -lB... >=20 > --=20 > Marc Glisse >