Home Help Center

slice2freeze error!

I just define the following struct:

module Demo{
class Info{
string name;

I run the slice2freezej, everything is OK.

But slice2freeze tell me, can't find the struct.

D:\>slice2freeze --dict StringInfoMap,string,::Demo::Info test.ice
slice2freeze: error: `::Demo::Info' is not a valid type

D:\>slice2freezej --dict StringInfoMap,string,::Demo::Info test.ice


How can I do with it?


  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Liwzh,

    It's a syntax problem with the slice2freeze command:
    C:\Users\bernard>slice2freeze -h
    Usage: slice2freeze [options] file-base [slice-files...]
    -h, --help            Show this message.
    -v, --version         Display the Ice version.

    The solution is to provide this 'file-base' parameter, e.g.:
    slice2freeze --dict StringInfoMap,string,::Demo::Info PersistentStringInfoMap test.ice

    With your command, slice2freeze mistakenly uses test.ice as your file-base and reads no .ice file. The .ice file parameters are optional since you can generate a persistent map of built-in types.

    We'll check if we can improve the error message in this situation.

  • SystemSystem Member
    Thanks a lot. Everything is OK!
Sign In or Register to comment.