Re: probably an old question about overriding hardcoded library search paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> wrote:

> From: Marc Glisse <marc.glisse@xxxxxxxx>
> Subject: Re: probably an old question about overriding hardcoded library search paths
> To: "Charles Smith" <cts.private@xxxxxxxxx>
> Cc: gcc-help@xxxxxxxxxxx
> 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
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux