Dee Jay:

When we linked with our C++ application on Solaris (under SUNWspro), we
found that 'ar' was
insufficient: some of the classes/methods that were defined as templates
were causing
unresolved external errors in the link phase. What we did was, first,
rebuild Xerces under
CC. Then, rather than use 'ar', we did the following:

src $ cd ../obj
obj $ CC -xar libxerces-c1_4.a *.o

That wound up instantiating and compiling the template classes/functions
that were actually
used in the Xerces code, and then linking those definitions into the
resulting static lib.
Presto, unresolved link errors disappeared.

- Roby

=============================
Roby Gamboa
Senior Software Engineer
Iris Financial Engineering
[EMAIL PROTECTED]
http://www.irisfinancial.com


> Subject: Re: Static library
> Date: Tue, 22 May 2001 17:23:50 -0600
> From: Dee Jay Randall <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
>
> On Tue, May 22 2001 at 11:05:28P -0500, McKenzie, William (WISM) wrote:
> > Is there any known problem with creating a statically-linked library from
> > the xerces sources?  I am using MSVC and would like to minimize run-time
> > dependencies.
>
>   Due to difficulties debugging (gdb seemed to choke on shared
> libs), I have been working with statisc libs. My OS is:
>   "SunOS 5.7 Generic_106541-12 sun4u sparc SUNW,Ultra-250"
> and gcc compiler version:
>   "gcc version 2.95.2 19991024 (release)"
>
>   All I did was a regular build and then:
> % cd xerces-c-src1_4_0/obj/
> % ar -r libxerces-c1_4.a *.o
>
>   This seems to have worked fine, although I have only used
> the DOM parser.
>
>   Regards,
>   Dee Jay
>
> +-----------------------------+------------------+-----------------------+
> | Founding Partner            | Software Engineer| Dee Jay Randall, B.Sc.|
> | Circular Reasoning          | Accrue Software  | M.Sc. Student, CS     |
> | [EMAIL PROTECTED]| www.accrue.com   | ICQ # 43551676        |
> +-----------------------------+------------------+-----------------------+
> What is the average rank of every song ever written? 42  -- www.launch.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to