Linking problem with servant implementation files



Hi,

Assume that we have two interfaces "A1" and "A2". Furthermore assume
that both of these interfaces have a method with uses a common interface
"A". These 3 interfaces are defined in 3 IDL files:

A.idl:
interface A {
	void method();
};

A1.idl:
#include "A.idl"
interface A1 {
	void method_1(in A);
};

A2.idl:
#include "A.idl"
interface A2 {
	void method_2(in A);
};

We now have a set of "-skelimpl.c" files after having run orbit-idl-2 on
them. We will instantiate these interfaces in the server main.c file as
usual. The problem is now that all 3 "-skelimpl.c" files contains a
definition of impl_A__create(). 

The usual method of "#include "A[,1,2]-skelimpl.c" in the server main.c
file will therefore result in 3 identical static "__create()" function
definitions as well as 3 identical copies of everything else in "A-
skelimpl.c". The problem is much the same for the generated ".h" files.
"A1.h" and "A2.h" both contain a copy of "A.h".

A possible fix would be to drop the static function/type definitions and
switch to ordinary header files with "extern" function and type
declarations.

Any reason why this is not done in the current implementation?

-- 
  jules



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]