xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Reakes <gar...@decisionsoft.com>
Subject Re: cannot find -lxerces-c2_1_0
Date Thu, 06 Feb 2003 08:54:37 GMT
Hi,
	are you sure you have a lib xerces-c2_1_0? If the samples build 
fine check out the linking line for one of them and see what library they 
are linking to.


Gareth



On Thu, 6 Feb 2003, Henrik Jensen wrote:

> I am a Linux newbie fiddling with a hobby project using Xerces under RH 6.2. 
> Project's been on hold for some months, and now, after reinstalling Linux and 
> getting Xerces 2.1 instead of 1.6, there is a problem when compiling:
> 
> g++ -g -o taber main.o [..other .o files..]
> -I/home/pos/taber/include \
>         -L/usr/local/xerces-c-src2_1_0/lib -lxerces-c2_1_0 \
>         -ldl -lutil -pg
> /usr/bin/ld: cannot find -lxerces-c2_1_0
> collect2: ld returned 1 exit status
> make: *** [taber] Error 1
> 
> The Xerces samples build fine, so Xerces must be properly installed.
> Thus the problem must be in either .bash_profile, or the Makefile?
> 
> 1) .bash_profile
> ===========================================
> .bash_profile contains this at the bottom:
> 
> export XERCESCROOT="/usr/local/xerces-c-src2_1_0"
> export LD_LIBRARY_PATH=$XERCESCROOT/lib:$LD_LIBRARY_PATH
> 
> XERCESCROOT points to the right directory, so that's not it.
> So .bash_profile should be ok.
> 
> 2) Makefile
> ===========================================
> The Makefile contains this:
> 
> taber :		$(obj)
> 		g++ -g -o taber $(obj) -I/home/pos/taber/include \
> 		-L/usr/local/xerces-c-src2_1_0/lib -lxerces-c2_1_0 \
> 		-ldl -lutil -pg
> 
> Again, with cut/paste I checked that the dir given to -L is correct,
> and it does point to the dir with the Xerces .so file.
> 
> Can anyone see what is wrong?
> Could be those switches -ldl -lutil, maybe some more should be in?
> 
> 3) ldconfig
> ===========================================
> Someone with a similar problem on this list got a reply saying "you usually 
> need to run ldconfig (as root) to let the linker know about your libraries" - 
> Is this the problem? If so, how do I do that? Tried man ld and other things 
> but there was no hint about it.
> 
> Thanks a lot in advance for any help,
> 
> Best regards,
> Henrik Jensen
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 

-- 
Gareth Reakes, Head of Product Development  +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services




---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Mime
View raw message