[xsd-users] compilation issue with setg method in zc-istream class

Brice oo.bryce.oo at gmail.com
Tue Aug 28 05:32:56 EDT 2012


Dear developers,

we tried to compile a simple source file (main.cpp in attached zip file),
using a generated class (created by code synthesis 3.3.0).

Compilation fails if we do not set -fpermissive compile option :

g++ -I include -L . -lxerces-c-3.1 main.cpp test.cpp
In file included from include/xsd/cxx/zc-istream.hxx:215:0,
                 from include/xsd/cxx/tree/parsing/date-time.txx:7,
                 from include/xsd/cxx/tree/parsing.hxx:10,
                 from test.h:68,
                 from test.cpp:41:
include/xsd/cxx/zc-istream.txx: In instantiation of âvoid
xsd::cxx::zc_streambuf<C>::init() [with C = char]â:
include/xsd/cxx/zc-istream.txx:17:7:   required from
âxsd::cxx::zc_streambuf<C>::zc_streambuf(const xsd::cxx::ro_string<C>&)
[with C = char]â
include/xsd/cxx/zc-istream.txx:64:20:   required from
âxsd::cxx::zc_istream_base<C>::zc_istream_base(const
xsd::cxx::ro_string<C>&) [with C = char]â
include/xsd/cxx/zc-istream.txx:82:45:   required from
âxsd::cxx::zc_istream<C>::zc_istream(const xsd::cxx::ro_string<C>&) [with C
= char]â
include/xsd/cxx/tree/parsing/long.hxx:69:30:   required from âstatic long
long int xsd::cxx::tree::traits<long long int, C,
(xsd::cxx::tree::schema_type::value)0u>::create(const
std::basic_string<_CharT>&, const xercesc_3_1::DOMElement*,
xsd::cxx::tree::flags, xsd::cxx::tree::container*) [with C = char;
xsd::cxx::tree::container = xsd::cxx::tree::_type]â
include/xsd/cxx/tree/parsing/long.hxx:44:52:   required from âstatic long
long int xsd::cxx::tree::traits<long long int, C,
(xsd::cxx::tree::schema_type::value)0u>::create(const
xercesc_3_1::DOMElement&, xsd::cxx::tree::flags,
xsd::cxx::tree::container*) [with C = char; xsd::cxx::tree::container =
xsd::cxx::tree::_type]â
test.cpp:123:69:   required from here
include/xsd/cxx/zc-istream.txx:35:7: error: âsetgâ was not declared in this
scope, and no declarations were found by argument-dependent lookup at the
point of instantiation [-fpermissive]
include/xsd/cxx/zc-istream.txx:35:7: note: declarations in dependent base
âstd::basic_streambuf<char>â are not found by unqualified lookup
include/xsd/cxx/zc-istream.txx:35:7: note: use âthis->setgâ instead

For information, the os used is a Linux CentOS :
$ cat /proc/version
Linux version 2.6.32-220.el6.x86_64 (gcc version 4.4.6 20110731 (Red Hat
4.4.6-3) (GCC) ) #1 SMP Tue Dec 6 19:48:22 GMT 2011

This does not happen with string types. We are here using integer types
(integer, unsignedInteger...)
Is there any solution ?

Best regards,

Brice
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue_code_synthesis.zip
Type: application/zip
Size: 6394 bytes
Desc: not available
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20120828/44008497/issue_code_synthesis.zip


More information about the xsd-users mailing list