Hi Alberto,

Alberto Massari <[EMAIL PROTECTED]> writes:

> The library name is specified in the autoconf script (I think), so
> the name must have been a choice of James who wrote the script in the
> first place. We can change it to be xerces-c if this helps the users.

I think this is a good idea. I came up with a patch (below). I noticed
one more thing: after I applied this patch, I had to regenerate
Makefile.in's by running the reconf script. After that the examples
stopped building:

/bin/sh ../libtool --tag=CXX --mode=link g++  -g -O2 -pthread -o \
CreateDOMDocument  src/CreateDOMDocument/CreateDOMDocument.o \
../obj/libxerces-c.la -lnsl  -L/usr/lib -licuuc -licudata -L/usr/lib \
-licuuc -licudata

g++ -g -O2 -pthread -o .libs/CreateDOMDocument \
src/CreateDOMDocument/CreateDOMDocument.o  ../obj/.libs/libxerces-c.so \
-lnsl -L/usr/lib -licuuc -licudata

/usr/bin/ld: warning: libXercesMessages3_0_0.so, needed by
../obj/.libs/libxerces-c.so, not found (try using -rpath or -rpath-link)

../obj/.libs/libxerces-c.so: undefined reference to `XercesMessages3_0_0_dat'

The only difference that I can see in libxerces-c.la compared to the
one built before running reconf is the different version of libtool
being used (1.5.23a vs 1.5.25). I also remember the original version
of libtool linking to libXercesMessages3_0_0.so explicitly while the
later one does not do this. Seems like the behavior of libtool has
changed (I assume that because libxerces-c.so is linked to
libXercesMessages.so, libtool thinks that it does not need to link
to libXercesMessages.so explicitly, which makes sense). Not sure
what to do about all this.


> That library has always been there, when ICU is chosen as the message
> loader (the choice is automatic if ICU is available).

Ah, I see. I guess this shouldn't be a big problem as long as
libxerces-c.so links to libXercesMessages.so and the application
developer does not need to link to it explicitly (at least not in
case of shared library).


> That's a side effect of having the sources in multiple
> subdirectories; autoconf must create "convenience libraries" from
> each folder (BTW, the libraries should be more; in fact the
> combination Cygwin+MSVC doesn't work)

Got it. Do you know what needs to be done to make Cygwin work?


Thanks,
Boris


Index: tests/Makefile.am
===================================================================
--- tests/Makefile.am   (revision 563790)
+++ tests/Makefile.am   (working copy)
@@ -21,7 +21,7 @@

 check_PROGRAMS =                                       ${testprogs}

-LDADD =                                                                
${top_builddir}/obj/libxerces.la
+LDADD =                                                                
${top_builddir}/obj/libxerces-c.la
 # the  -I${top_builddir}/src is needed to pick the 
xercesc/util/Xerces_autoconf_config.hpp
 # header file when doing out-of-tree builds
 AM_CPPFLAGS =                                           -I${top_builddir}/src 
-I${top_srcdir}/src
Index: samples/Makefile.am
===================================================================
--- samples/Makefile.am (revision 563790)
+++ samples/Makefile.am (working copy)
@@ -21,7 +21,7 @@

 bin_PROGRAMS =                                         ${sampleprogs}

-LDADD =                                                            
${top_builddir}/obj/libxerces.la
+LDADD =                                                            
${top_builddir}/obj/libxerces-c.la
 # the  -I${top_builddir}/src is needed to pick the 
xercesc/util/Xerces_autoconf_config.hpp
 # header file when doing out-of-tree builds
 AM_CPPFLAGS =                                           -I${top_builddir}/src 
-I${top_srcdir}/src
Index: obj/Makefile.am
===================================================================
--- obj/Makefile.am     (revision 563790)
+++ obj/Makefile.am     (working copy)
@@ -21,14 +21,13 @@

 include ../version.incl

-lib_LTLIBRARIES        =                       libxerces.la
-libxerces_la_SOURCES =
-nodist_EXTRA_libxerces_la_SOURCES = dummyfile-to-force-cpp-linking.cpp
+lib_LTLIBRARIES        =                       libxerces-c.la
+libxerces_c_la_SOURCES =
+nodist_EXTRA_libxerces_c_la_SOURCES = dummyfile-to-force-cpp-linking.cpp

-libxerces_la_LIBADD =          ${top_builddir}/src/libsrc.la 
${top_builddir}/lib/libcompat.la
-libxerces_la_LDFLAGS =         -release ${PACKAGE_VERSION}
+libxerces_c_la_LIBADD =                ${top_builddir}/src/libsrc.la 
${top_builddir}/lib/libcompat.la
+libxerces_c_la_LDFLAGS =               -release ${PACKAGE_VERSION}

 if XERCES_USE_MSGLOADER_ICU
-libxerces_la_LDFLAGS +=                -L${top_builddir}/obj/.libs 
-lXercesMessages$(VER)
+libxerces_c_la_LDFLAGS +=              -L${top_builddir}/obj/.libs 
-lXercesMessages$(VER)
 endif
-
-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding


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

Reply via email to