probably an old question about overriding hardcoded library search paths
Charles Smith
cts.private@yahoo.com
Sun Nov 11 20:41:00 GMT 2012
God, you guys are fast!
Okay, I tried that, and then it came up with - first, the pthread library was 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 <marc.glisse@inria.fr> wrote:
> From: Marc Glisse <marc.glisse@inria.fr>
> Subject: Re: probably an old question about overriding hardcoded library search paths
> To: "Charles Smith" <cts.private@yahoo.com>
> Cc: gcc-help@gcc.gnu.org
> Date: Sunday, November 11, 2012, 12:30 PM
> On Sun, 11 Nov 2012, Charles Smith
> wrote:
>
> > I confess I'm confused.
> >
> > I thought that it worked, but now it's not working any
> more:
> >
> > g++ \
> > -L"/home/me/dir1" \
> > -L"/home/me/dir2" \
> > -L"/home/me/dirn" \
> >
> /home/me/opt/lib/libsqlite3.a \
> > -o
> "FLAT" ./a.o ./b.o -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'
>
> If A depends on B, put -lA before -lB...
>
> --
> Marc Glisse
>
More information about the Gcc-help
mailing list