[xsd-users] Compilation Error in zc-istream.txx with gcc 4.7.0.
Chinenye Ajagu
Chinenye.Ajagu at flextrade.com
Mon Feb 11 13:11:58 EST 2013
Hi,
I have just attempted to compile the auto-generated source code with my
c++ project, and I get a compilation error in libxsd/xsd/cxx/zc-istream.txx.
/home/cajagu/workspace/xsd-3.3.0-x86_64-linux-gnu/libxsd/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]
/home/cajagu/workspace/xsd-3.3.0-x86_64-linux-gnu/libxsd/xsd/cxx/zc-istream.txx:35:7: note: declarations in dependent base 'std::basic_streambuf<char>' are not found by unqualified lookup
/home/cajagu/workspace/xsd-3.3.0-x86_64-linux-gnu/libxsd/xsd/cxx/zc-istream.txx:35:7: note: use 'this->setg' instead
The *zc-istream* class is derived from *std::basic_streambuf* which has
the protected function *setg()*. When *zc-istream* attempts to call this
method in its *init()* function, the compiler doesn't seem to be able to
find that method, unless you make the call by doing *this->setg()* (as
suggested with the error message). Making that tiny change fixed the
issue for me and I was able to carry on and use everything as normal.
I'm using gcc version 4.7. When I switch to using gcc version 4.1.2,
this compiles fine with no errors both with an without the change. Maybe
it will be worth updating that file to do it in the slightly modified way?
Let me know what you think in any case, just in case I should not carry
on using it as it is now.
Thanks,
Chi
More information about the xsd-users
mailing list