Archived
This forum has been archived. Please start a new discussion on GitHub.
slice2freeze problem!!
I followed the tutorial to implement the file system, and try to get a map by:
slice2freeze -I%ICE_HOME%\slice --dict \
IdentityNodeMap,Ice::Identity,Filesys::PersistentNode \
IdenetityNodeMap \
Filesys.ice %ICE_HOME%\slice\Ice\Identity.ice
but i always got this error:
e:\\Ice-1.4.0\\slice\\Ice\\Identity.ice:13: illegal identifier `Ice': `Ice' prefix is reserved
I know 'Ice' is reserved, but I only want to make the key of my map to reuse the Slice language file, what's wrong?
slice2freeze -I%ICE_HOME%\slice --dict \
IdentityNodeMap,Ice::Identity,Filesys::PersistentNode \
IdenetityNodeMap \
Filesys.ice %ICE_HOME%\slice\Ice\Identity.ice
but i always got this error:
e:\\Ice-1.4.0\\slice\\Ice\\Identity.ice:13: illegal identifier `Ice': `Ice' prefix is reserved
I know 'Ice' is reserved, but I only want to make the key of my map to reuse the Slice language file, what's wrong?
0
Comments
-
Please use the option --ice, which disables the check for the Ice prefix. We added this check so that nobody accidentially uses the Ice prefix in slice code.0
-
Originally posted by marc
Please use the option --ice, which disables the check for the Ice prefix. We added this check so that nobody accidentially uses the Ice prefix in slice code.
Thanks a lot:-)0 -
Ice reserves identifiers beginning with Ice (in any capitalization) for internal purposes. If you attempt to define a type with a name that starts with Ice, the compilers will complain, unless you use the --Ice option.
However, if you merely use a type whose name starts with Ice (instead of defining such a type), the compilers do not require you to use the --Ice option. For example:// File: Example.ice #include <Ice/Identity.ice> #include <Filesystem.ice> dictionary<Ice::Identity, Filesystem::PersistentNode> MyDict;
You can compile this with:
slice2whatever -I%ICE_HOME%\slice -I. [options...] Example.ice
In other words, the compiler only checks for definition of types beginning with Ice in the outermost file, but not in included files.
Cheers,
Michi.0 -
so the long document should be update? :-)0
-
I'm not sure what you mean. Do you mean that there is a bug in the doc? If so, could you please let me know where the error is?
Thanks,
Michi.0