Hi,
I tried to compile the sources (1.7.1) today (on my
Gentoo and my KUbuntu PCs) and it fails due to an
casting error in the file src/cybergarage/xml/XML.cpp
Here the output of my compiler:
g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include
-g -O2 -c -o XML.o `test -f
'../../src/cybergarage/xml/XML.cpp' || echo
'./'`../../src/cybergarage/xml/XML.cpp
../../src/cybergarage/xml/XML.cpp: In function
`UnicodeStr*
CyberXML::XML::Local2Unicode(const char*, int&)':
../../src/cybergarage/xml/XML.cpp:151: error: invalid
conversion from `const
char**' to `char**'
And here is the line of code that effects the error
above:
size_t ret = iconv(cd, &inbuf, &inbyteleft, &coutbuf,
&outbyteleft);
I guess this can be fixed easily :-)
My workaround until then is to delete the following
lines from the config.h
#define HAVE_ICONV 1
#define HAVE_ICONV_H 1
so the code for systems without iconv is used.
Logged In: YES
user_id=209834
1.) I found a better workaround: Just comment the following
three lines out in the file configure.in:
AC_CHECK_FUNCS([iconv])
AC_CHECK_HEADERS([iconv.h])
AC_CHECK_LIB([iconv],[main])
afterwards run:
bash$ autoheader && automake && aclocal && autoconf
and then just
bash$ ./configure && make
2.) I found another bug in the file include/Makefile.am.
The file cybergarage/io/Reader.h is missing within the
clink_header variable so it´s not
installed with make install. This leads to errors if you
try to use the clink library within your project. This can
be fixed by adding the following line to the clink_header
variable:
cybergarage/io/Reader.h \
I attached the patched configure.in and include/Makefile.am
to this comment.
Logged In: YES
user_id=321934
Another Workaround is to just change the offending pointer:
--- CyberLink/src/cybergarage/xml/XML.cpp 1970-01-01
02:02:17.000000000 +0100
+++ CyberLink-chenz/src/cybergarage/xml/XML.cpp 2005-12-02
17:35:49.000000000 +0100
@@ -123,7 +123,7 @@
char *cpbuf = strdup(str);
if (cpbuf == NULL)
return NULL;
- const char *inbuf = cpbuf;
+ char *inbuf = cpbuf;
size_t inbyteleft = strlen(str);
size_t outbufSize = inbyteleft * sizeof(UnicodeStr) * 4;
UnicodeStr *outbuf = new UnicodeStr[outbufSize + 1];