Archived
This forum has been archived. Please start a new discussion on GitHub.
slice2cpp -IDIR works, --include-dir DIR doesn't
shaver
in Bug Reports
--include-dir doesn't seem to work the way I would expect from the --help output (and from a quick read of slice2cpp/Main.cpp, I can't really tell what it's trying to do):
(": tmp; " is my prompt, in case that confuses.)
Mike
: tmp; cat slice/Base.ice
module Test {
interface Base { };
};
: tmp; cat slice/Derived.ice
#include <Base.ice>
module Test {
interface Derived extends Base { };
};
: tmp; slice2cpp -Islice slice/Derived.ice
: tmp; slice2cpp --include-dir slice slice/Derived.ice
slice/Derived.ice:1: No include path in which to find Base.ice
slice/Derived.ice:4: `Base' is not defined
: tmp;
(": tmp; " is my prompt, in case that confuses.)
Mike
0
Comments
-
The two options are different:
-IDIR Put DIR in the include file search path. --include-dir DIR Use DIR as the header include directory.
The first specifies that DIR should be added to the search path for Slice files. The second instructs slice2cpp to generate code for which the C++ header files can be found in DIR.0 -
I was trying to make slice2cpp put the generated .h file in a directory I want to specify. Isn't there an option for that, like --output-dir for the sources? I mean, my project is like this: header files come in include/ and source files come in src/. If I use --output-dir src, then both the header file and the source file come there. I don't want that. Maybe fixable?

For the rest, I'm greatly enjoying Ice
0 -
At present you can only provide the output directory for both the header and source files together. However, using Makefiles or VC++ project post-build steps, it's quite easy to add commands that move the generated files to any directory you wish. For examples, have a look at the various Makefiles and project files that are included in the Ice source distribution.0
