Archived

This forum has been archived. Please start a new discussion on GitHub.

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

D:\>


How can I do with it?

Comments

  • bernard
    bernard Jupiter, FL
    Hi Liwzh,

    It's a syntax problem with the slice2freeze command:
    C:\Users\bernard>slice2freeze -h
    Usage: slice2freeze [options] file-base [slice-files...]
    Options:
    -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.

    Cheers,
    Bernard
  • Thanks a lot. Everything is OK!