Thanks, Boris,
I have fixed this problem.
1. My first solution is to rename the share library(.so
files). This solution works not very good as the g++ complains :undefined
reference to '__ctype_b', I googled and add some code to fix this problem.
2. My second solution works very good. I downloaded the xerces c++
3.11 source code and compile it myself under my develop machine. After
compiling , I copied the lib to my lib directory. It works fine when i add
-lcurl to the link flags though I don't know why I should add this flag.
On my own laptop, there are no difficulties as apt-get helps me do all the
job. My develop machine uses RedHat and the gcc/g++ version is not
update-to-date, I hate not having authority to update the software on my dev
machine.
On Tue, Aug 24, 2010 at 5:12 AM, Boris Kolpackov <[email protected]>wrote:
> Hi Weiwei,
>
> Weiwei Wang <[email protected]> writes:
>
> > As I need to run my program on a different linux machin so I need to
> > statically link the xerces lib for my project.
>
> Try to specify libxerces-c.a directly instead of -lxerce-c in your
> linker command line. Something like /usr/lib/libxerces-c.a
>
>
> > I tried -DXERCES_SATIC_LIBRARY but it does not work:(
>
> This is only necessary for Windows/VC++.
>
> Boris
>
> --
> Boris Kolpackov, Code Synthesis
> http://codesynthesis.com/~boris/blog
> Open-source XML data binding for C++
> http://codesynthesis.com/products/xsd
> XML data binding for embedded systems
> http://codesynthesis.com/products/xsde
> Command line interface to C++ compiler
> http://codesynthesis.com/projects/cli
>
--
王巍巍
百度 商务搜索部
工位:F5-BE327 分机:5594
地址:北京市海淀区上地十街10号 百度大厦 100085
手机:18601042316 百度 Hi: elegate