|
|
|
|||||
|
Output directories and include directories for slice2cpp
So, say I have a whole multi-level directory hierarchy of Ice files, some of which include one another. Something like this:
mod/sub1/Foo1.ice Code:
module mod {
module sub1 {
interface Foo1 {
};
};
};
Code:
#include <mod/sub1/Foo1.ice>
module mod {
module sub2 {
interface Foo2 {
};
};
};
Am I doing something wrong here? This seems to be overly complicated; it would be nice if the files got generated into a similar directory hierarchy as the Slice files. Or maybe I'm just seeing this all through my Java-programmer goggles and the true C++ way to do things is something else. ![]() Thanks for any suggestions, MEF
__________________
Mary Ellen Foster Technical University of Munich JAST human-robot dialogue system Maintainer of Fedora Ice packages |
|
|||||
|
Have you tried the "--output-dir" option of slice2cpp? Maybe this could help, if you compile the ice file(s) by hand.
If you put these preliminary steps into makefiles, you could "walk through" the slice file hierachy and compile the specifications in the respective directories directly. Take care, Andreas |
|
||||||
|
Just to be clear, you could run slice2cpp as follows:
$ slice2cpp -I. -Imod/sub1 mod/*/*.ice Note that the first option (-I.) enables the compiler to locate the included file, whereas the only purpose of the second -I option is to customize the #include statements in the generated header files. As a result, the file Foo2.h should now contain #include <Foo1.h>. If you want to modify the #include statement in a generated source file, you can use the --include-dir option. You would only do that if you were going to move the generated header file out of the directory containing the generated source file. Naturally, whatever you do will have an impact on your application code, so you have to structure your source code, customize the generated #include statements, and specify the proper C++ compiler options so that everything builds properly. Hope that helps, - Mark |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pb with installation directories including space in name | vermorel | Bug Reports | 2 | 12-08-2005 01:18 PM |
| ICE-2.0.0.zip doesn't have /bin and /lib directories. | Arun | Bug Reports | 2 | 11-23-2004 01:06 AM |
| module names not correctly translated while generating directories in Java | vsonnathi | Bug Reports | 1 | 11-08-2004 08:02 PM |
| IcePack.Registry.Data and IcePack.Node.Data directories | vsonnathi | Comments | 0 | 10-21-2004 06:12 PM |
| slice2cpp output that won't compile | record | Bug Reports | 1 | 06-25-2004 02:48 PM |