[Top][All Lists]

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

Re: Buliding a shared library and need to specify an existing library, h

From: Ralf Wildenhues
Subject: Re: Buliding a shared library and need to specify an existing library, how?
Date: Thu, 29 Jun 2006 05:27:37 +0200
User-agent: Mutt/1.5.11+cvs20060403

Hello Jim,

* Jim wrote on Wed, Jun 28, 2006 at 09:50:53PM CEST:
> One of the classes in the shared library requires/references a system 
> library.  I included the system library in the library list of the 
> program that is using the shared library but I guess because the objects 
> in the program don't require it, the loader is ignoring it and complains 
> that it can't find "....". 

> I tried reordering the references, but if that's the solution, I didn't 
> get it right.

Note you list -lsqlite3 both before and after -limageserver-0.1.
Try listing it after only (or do they depend on each other mutually?
Then you may need --preserve-dup-deps in AM_LIBTOOLFLAGS).  But...

> Here's the error:
> g++ -g -O2 -o vaprobe arc.o probethread.o protocamera.o protosimple.o 
> vaprobe.o  -L/usr/lib/mysql -limageserver-0.1 /usr/lib/ 
> -lmysqlpp -lboost_regex /usr/lib/ -lpthread -lssl 
> -lccgnu2 /usr/lib/ -lccext2 -ldl /usr/lib/
> /usr/local/lib/ undefined reference to 
> `sqlite3_decode_binary(unsigned char const*, unsigned char*)' sqlite3_decode_binary a function with C or C++ linkage?  The above
error does not find a C++ linkage function, maybe that was the real
problem.  Also, on my system, the /usr/lib/ from Debian
package libsqlite3-0 3.2.1-1 apparently does not contain a function of
this name at all, neither C nor C++ linkage.

> Here's the imageserver/ file
> INCLUDES = -I/usr/include/cc++2 -I/usr/local/include 
> -I/usr/include/mysql -I/usr/local/include/imageserver-0.0
> DEPS_CLAGS = -I/usr/include/cc++2 -I/usr/local/include -I/usr/include/mysql
> DEPS_LIBS=  -L/usr/lib/mysql -lsqlite3 -limageserver-0.1 -lsqlite3 
> -lmysqlpp -lboost_regex -lmysqlclient -lpthread -lssl -lccgnu2 -lcurl 
> -lccext2 -ldl -lxml2

> Note, I tried to put it in before and after but libtool reoders it. 
> Is there somthing I can do when I generate the shared library that might 
> get saved so the loader knows I need the sqlite3 library?  This worked 
> fine when the class referencing the sqlite3 library was part of the 
> vaprobe program.

Hope this helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]