[xsd-users] unicode support
Remsy Schmilinsky
rschmilinsky at yahoo.ca
Mon Jul 31 06:09:07 EDT 2006
Hi. I modified the parser-rules.make for the hello example to enable --char-type wchar_t option because I need my application to support unicode.
Now the driver application won't compile, I get the following errors. What do I have to change? It looks like string is no longer the appropiate data type at line 52 of driver.cxx. The application works fine if I don't activate char-type option as wchar_t. Please help.
xsd cxx-parser --xml-parser xerces --char-type wchar_t --hxx-suffix .h hello.xsd
g++ -Wall -g -I/usr/local/include -c driver.cpp
driver.cpp: In function âint main(int, char**)â:
driver.cpp:52: error: no matching function for call to âhello_parser::greeting_parser(xml_schema::string&)â
hello.txx:48: note: candidates are: void _xsd_hello_type::hello_type<_xsd_greeting_, _xsd_name_>::greeting_parser(xsd::cxx::parser::parser<X, wchar_t>&) [with _xsd_greeting_ = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _xsd_name_ = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]
driver.cpp:53: error: no matching function for call to âhello_parser::name_parser(xml_schema::string&)â
hello.txx:59: note: candidates are: void _xsd_hello_type::hello_type<_xsd_greeting_, _xsd_name_>::name_parser(xsd::cxx::parser::parser<_xsd_name_, wchar_t>&) [with _xsd_greeting_ = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, _xsd_name_ = std::basic_string<char, std::char_traits<char>, std::allocator<char> >]
driver.cpp:59: error: no matching function for call to âxml_schema::document<void>::document(hello_parser&, const char [6])â
hello.h:89: note: candidates are: xml_schema::document<X>::document(xsd::cxx::parser::parser<X, wchar_t>&, const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&, const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&) [with X = void]
hello.h:80: note: xml_schema::document<X>::document(xsd::cxx::parser::parser<X, wchar_t>&, const std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >&) [with X = void]
hello.h:78: note: xml_schema::document<void>::document(const xml_schema::document<void>&)
/usr/local/include/xercesc/sax/InputSource.hpp:244: error: âxercesc_2_7::InputSource::InputSource(const char*, xercesc_2_7::MemoryManager*)â is protected
driver.cpp:61: error: within this context
driver.cpp:61: error: cannot allocate an object of abstract type âconst xercesc_2_7::InputSourceâ
/usr/local/include/xercesc/sax/InputSource.hpp:63: note: because the following virtual functions are pure within âconst xercesc_2_7::InputSourceâ:
/usr/local/include/xercesc/sax/InputSource.hpp:91: note: virtual xercesc_2_7::BinInputStream* xercesc_2_7::InputSource::makeStream() const
driver.cpp:65: error: no match for âoperator<<â in âstd::cerr << eâ
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:67: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:78: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ios<_CharT, _Traits>& (*)(std::basic_ios<_CharT, _Traits>&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:90: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:125: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:159: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:102: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:176: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:187: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:191: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:202: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:183: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:218: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:242: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:217: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:265: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:288: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:311: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_streambuf<_CharT, _Traits>*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:502: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:497: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:616: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:571: note: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:463: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:458: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/bits/ostream.tcc:509: note: std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char) [with _Traits = std::char_traits<char>]
/usr/lib/gcc/i486-linux-gnu/4.0.3/../../../../include/c++/4.0.3/ostream:447: note: std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char) [with _CharT = char, _Traits = std::char_traits<char>]
/usr/include/xsd/cxx/parser/exceptions.hxx:28: note: std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& xsd::cxx::parser::operator<<(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, const xsd::cxx::parser::exception<wchar_t>&)
/usr/include/xsd/cxx/parser/exceptions.ixx:130: note: std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& xsd::cxx::parser::operator<<(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, const xsd::cxx::parser::errors<wchar_t>&)
/usr/include/xsd/cxx/parser/exceptions.ixx:119: note: std::basic_ostream<wchar_t, std::char_traits<wchar_t> >& xsd::cxx::parser::operator<<(std::basic_ostream<wchar_t, std::char_traits<wchar_t> >&, const xsd::cxx::parser::error<wchar_t>&)
make: *** [driver.o] Error 1
---------------------------------
Make free worldwide PC-to-PC calls. Try the new Yahoo! Canada Messenger with Voice
More information about the xsd-users
mailing list