idl compilation problems

Björn Wingman bjowi@REDACTED
Mon Jul 22 16:47:59 CEST 2002


If I have two idl-files, test1.idl and test2.idl, like these:

test1.idl:

#ifndef TEST1
#define TEST1

module A {
  struct Vec {
    double x;
    double y;
    double z;
  };
};

#endif

test2.idl:

#ifndef TEST2
#define TEST2

#include "test1.idl"

module A {
  struct Pos {
    double x;
    double y;
    double z;
  };
};

#endif


...and I compile then with ic:gen(), the generated .hrl file (A.hrl)
will only contain either the Vec or the Pos struct (as a record),
depending on in which order I compiled the files. Even if I compile
only test2.idl (which includes test1.idl), only Pos appears in A.hrl.

I have fiddled around with preprocessor options, and using cpp instead
of the built-in preprocessor. How do I solve this?

I'm using this ic:

1> m(ic).
Module ic compiled: Date: March 21 2002, Time: 16.12
Compiler options:  [v3,
                    debug_info,
                    {parse_transform,sys_pre_attributes},
                    {attribute,insert,vsn,"ic_4.1.1"},
                    {outdir,"/home/bjowi/otp_src_R8B-0/lib/ic/src/../ebin"},
                    {cwd,'/home/bjowi/otp_src_R8B-0/lib/ic/src'}]
Object file: /usr/local/lib/erlang/lib/ic-4.1.2/ebin/ic.beam


       /Björn Wingman



More information about the erlang-questions mailing list