Archived
This forum has been archived. Please start a new discussion on GitHub.
Compile error using VERSION in module
ctennis
in Bug Reports
(Ice.3.0.1):
I didn't see anything in the docs about not using this variable name, and the slice2cpp compiler doesn't generate an error.
given this slice file:
module SCXI {
const int VERSION = 1;
...
};
When I attempt to use ::SCXI::VERSION my in code on the server side I get this error:
main.cpp: In member function 'virtual bool SCXIService::start(int, char**)':
main.cpp:41: error: expected unqualified-id before numeric constant
make: *** [.obj/main.o] Error 1
However, if I change the name to VERS in the slice file and in my server side, and rebuild the project, it builds okay.
I didn't see anything in the docs about not using this variable name, and the slice2cpp compiler doesn't generate an error.
given this slice file:
module SCXI {
const int VERSION = 1;
...
};
When I attempt to use ::SCXI::VERSION my in code on the server side I get this error:
main.cpp: In member function 'virtual bool SCXIService::start(int, char**)':
main.cpp:41: error: expected unqualified-id before numeric constant
make: *** [.obj/main.o] Error 1
However, if I change the name to VERS in the slice file and in my server side, and rebuild the project, it builds okay.
0
