Archived

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

Slice Include Path

I have looked through the documentation, but I cannot find the answer to this...

A few of the slice files in the demos include slice files from elsewhere in the Ice directory, such as Glacier2/Session.ice. The solution files (I'm using MSVC7.1) use -I in the command line to include the directory.

I was wondering if there was any way to set that directory automatically (such as with an enviroment variable) because I am unable to use slice2cpp from a command prompt without the -I flag.

Comments

  • matthew
    matthew NL, Canada
    No this isn't possible. Why aren't you able to set the include path?
  • Thanks for the reply. I am able to set the include dir using the -I flag, but I was just wondering if there was another way to set include directories that I was overlooking.
  • Is there any possibility in having an env variable (similar to CPLUS_INCLUDE_PATH) for slice2<XXX>?
  • Personally, I'm not too fond of having command-line options passed as environment variables. It creates a hidden parameter, and also raises the question of what should happen if both the variable and the command-line option are present.

    If you really must use an environment variable, I suggest to create a small shell script that retrieves the variable, converts it to a command-line option, and then execs slice2cpp.

    Cheers,

    Michi.