Archived
This forum has been archived. Please start a new discussion on GitHub.
slice2cpp problem without --stream option
Hi,
By chance I came across this potential problem in slice2cpp compiler.
We normally call slice2cpp with --stream option which leads to successful compilation.
A colleague was using our Slice files in a separate project and used slice2cpp without --stream.
I've setup a test case which seems to confirm this.
Compiling the code generated without --stream leads to this error:
Ice-3.4.0 with Patch 1
Linux, gcc-4.3/4.4
Cheers,
Alex
By chance I came across this potential problem in slice2cpp compiler.
We normally call slice2cpp with --stream option which leads to successful compilation.
A colleague was using our Slice files in a separate project and used slice2cpp without --stream.
I've setup a test case which seems to confirm this.
module m { exception Ex { string s; }; };
Compiling the code generated without --stream leads to this error:
In file included from test2.cpp:21:
test2.h:67: error: expected unqualified-id before ‘&’ token
test2.h:67: error: expected ‘,’ or ‘...’ before ‘&’ token
test2.h:68: error: expected unqualified-id before ‘&’ token
test2.h:68: error: expected ‘,’ or ‘...’ before ‘&’ token
test2.cpp:97: error: prototype for ‘void m::Ex::__write(const Ice::OutputStreamPtr&) const’ does not match any in class ‘m::Ex’
test2.h:67: error: candidates are: virtual void m::Ex::__write() const
test2.cpp:73: error: virtual void m::Ex::__write(IceInternal::BasicStream*) const
test2.cpp:105: error: prototype for ‘void m::Ex::__read(const Ice::InputStreamPtr&, bool)’ does not match any in class ‘m::Ex’
test2.h:68: error: candidates are: virtual void m::Ex::__read()
test2.cpp:82: error: virtual void m::Ex::__read(IceInternal::BasicStream*, bool)
Ice-3.4.0 with Patch 1
Linux, gcc-4.3/4.4
Cheers,
Alex
0