xerces-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henrik Jensen <evil_wic...@ofir.dk>
Subject cannot find -lxerces-c2_1_0
Date Thu, 06 Feb 2003 08:38:33 GMT
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"

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

View raw message