|
|
|
|||||
|
Include syntax of generated files.
I am using #include "..." syntax in an ice input file and the generated code is changing it to #include <...>. This makes it hard to create -I paths to access the files. There is a subtle difference between the following:
#include <xyz.h> #include "xyz.h" and this difference is sometimes important. In my case I'm moving generated header files to a public include dir. Putting -I. on the include path will not work because -I. means the current directory of compilation process whereas "xyz.h" means current dir of the file in which the #include "xyz.h" is located. Note that '-I.' is not always even the current dir of the .cpp file being compiled. Can the generated code preserve the quotes or angle brackets as they are in the input file? I suppose it may be hard to do because the preprocessor has already removed this information. Just thougt I'd ask before I make a workaround.
__________________
-john |
|
|||||
|
Can the <> include path information?
// -*- mode: idl -*- #ifndef NavUpdate_ice #define NavUpdate_ice #ifndef NavData_ice # include <cnav/NavData.ice> // << See here #endif module cnav { interface NavUpdate { nonmutating void update(NavData data); }; }; #endif /* NavUpdate_ice */ ---------------------------------------------- The manual is ambiguous: • #include directives can appear only at the beginning of a Slice source file, that is, they must precede all other Slice definitions. In addition, only #include directives using the <>-syntax to specify a file name are permitted; use of the ""-syntax is not supported. For example: #include <File1.ice> // OK #include "File2.ice" // Not supported! Doesn't say no '/'. I tried it and it doesn't work.
__________________
-john Last edited by JohnB : 02-23-2005 at 05:23 PM. |
|
||||||
|
Quote:
- Mark |
|
|||||
|
Quote:
Eample: $ slice2cpp --include-dir CNAV ... Produces: include <CNAV/NavData.h> That works for me. The documenation (both --help and pdf manual) doesn't quite make this clear. Here's what command line help says. --include-dir DIR Use DIR as the header include directory in source files.
__________________
-john Last edited by JohnB : 02-24-2005 at 09:40 AM. |
![]() |
| 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 |
| Custom headers in generated files | Sameerrele | Help Center | 2 | 10-17-2006 07:02 PM |
| Compatibility of files .h and .cpp generated from a .ice | mykael | Help Center | 1 | 07-12-2006 09:34 AM |
| Any editor with SLICE syntax highlight ? | hack | Help Center | 2 | 09-27-2004 10:17 AM |
| sequences syntax | panic | Help Center | 1 | 12-04-2003 09:55 AM |
| generated #include | clemens | Help Center | 1 | 06-04-2003 08:21 AM |