Archived

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

how tu Use "include"

i use the demo \Glacier2\chat
slice2cpp chat.ice got an error "can't open include file ".

and i wrote my ice file,one dictionary has two ice file,when use the "include",it also produce an error.

my environement variable settings wrong?

Comments

  • dwayne
    dwayne St. John's, Newfoundland
    You need to specify the directories where the included files are located using the -I directive. For example, the Chat.ice slice file in the Glacier2 chat demo includes one of the Ice slice files. Therefore you need add specify the main Ice slice directory as an include directory. Assuming you have installed Ice in C:\Ice-3.3.1, your command line would be
    slice2cpp -IC:\Ice-3.3.1\slice Chat.ice
    
    If in your own slice files you are including other slice files in the same directory then you need to add "-I." in order for those files to be found by the slice compiler.
  • thanks,dwayne