[omniORB] IDL #includes -> C++ #includes

baileyk@schneider.com baileyk@schneider.com
Wed Aug 7 18:25:02 2002


That would probably work for a single include path.  I'm assuming you would
do something like this from within directory c when compiling c.idl:

(cd .. ; omniidl -bcxx -Wbkeep_inc_path -I. -Cc c/c.idl)

This does what I want in the simple example.  However, does it extend to
multiple include paths?  What if my a and b directories are not in the same
place?  Something like

dir1/a/a.idl
dir2/b/b.idl
dir3/c/c.idl

Within dir3/c I'd like to generate c.hh with #include <b/b.hh> by using the
compile command

omniidl -bcxx -I/somepath/dir1 -I/somepath/dir2 c.idl

Using the above approch I tried

(cd ../.. ; omniidl -bcxx -Idir1 -Idir2 -Wbkeep_inc_path -Cdir3/c
dir3/c/c.idl)

but that still leaves dir1 and dir2 as part of the include directives in
c.hh.  I'd be willing to try to implement a -Wbkeep_rel_inc_path option.  I
was hoping for a pointer to the right part of the compiler.  I'll start
searching for it myself.

Kendall



                                                                                                                       
                    Stefan Seefeld                                                                                     
                    <seefeld@sympatico.c       To:     omniorb-list@realvnc.com                                        
                    a>                         cc:                                                                     
                    Sent by:                   Fax to:                                                                 
                    omniorb-list-admin@r       Subject:     Re: [omniORB] IDL #includes -> C++ #includes               
                    ealvnc.com                                                                                         
                                                                                                                       
                                                                                                                       
                    08/07/2002 11:28 AM                                                                                
                                                                                                                       
                                                                                                                       




hey Kendall,

I once had the same problems, and I still find omniidl a bit confusing
on the matter. What I ended up doing was to use a combination of
options -Wbkeep_inc_path, -I, and -C with an appropriate 'cd'. That's
quite a hack, but it works.

It means that (since you don't have full control over the generated
include paths) you have to be at one place when reading the idl files,
and at a different place when generating the output (thus the -C).

Any less hackish solution to the problem would be highly welcome !

Hope this helps,
                     Stefan



_______________________________________________
omniORB-list mailing list
omniORB-list@realvnc.com
http://www.realvnc.com/mailman/listinfo/omniorb-list