Discussion:
Forward declaration in different idl files.
Bertrand MAISONNEUVE
2009-08-13 09:20:58 UTC
Permalink
Hi all,

I'm trying to use forward declaration in idl files and I'm experiencing
some difficulties.

My code is composed of two interfaces declared in separate idl files:



//A.idl

#include "B.idl"

Interface A : B

{

....

}



//B.idl



Interface A;



Interface B

{

Toto(A);

}



The .h and .cpp generation goes well but when I try to compile, I have
the following errors:



src/B.cpp: In member function `virtual void
B_stub::RegisterA(ERSA::Identifier, A*)':

src/B.cpp:172: error: `_marshaller_A' was not declared in this scope

src/B.cpp: In member function `bool
POA_B::dispatch(CORBA::StaticServerRequest*)':



Is it possible to use forward declaration on an interface defined in
another idl file ?



I'm using mico 2.3.12 on Red Hat 4.



Thanks,



Bertrand MAISONNEUVE
---------------------------------------------------
European Rail Software Applications
5, Rue Maurice Blin
67500 HAGUENAU
France
Tel : (0033) 3 88 07 15 50

Fax : (0033) 3 88 07 15 51
E-mail : mailto:***@ersa-france.com
<mailto:***@ersa-france.com>
Internet : http://www.ersa-france.com <http://www.ersa-france.com>
---------------------------------------------------
Karel Gardas
2009-08-14 09:00:41 UTC
Permalink
Hi,

indeed, this case is not supported by MICO IDL compiler, but it seems
there are several workarounds for this issue. The most obvious is to
merge IDL definitions to one file. The second a little bit more complex
involves simple change in generated C++ file. The question is, are you
going to hack MICO IDL compiler to support this case or in general are
you interested in having such support in MICO IDL compiler?

Thanks,
Karel
Post by Bertrand MAISONNEUVE
Hi all,
I'm trying to use forward declaration in idl files and I'm experiencing
some difficulties.
//A.idl
#include "B.idl"
Interface A : B
{
....
}
//B.idl
Interface A;
Interface B
{
Toto(A);
}
The .h and .cpp generation goes well but when I try to compile, I have
src/B.cpp: In member function `virtual void
src/B.cpp:172: error: `_marshaller_A' was not declared in this scope
src/B.cpp: In member function `bool
Is it possible to use forward declaration on an interface defined in
another idl file ?
I'm using mico 2.3.12 on Red Hat 4.
Thanks,
Bertrand MAISONNEUVE
---------------------------------------------------
European Rail Software Applications
5, Rue Maurice Blin
67500 HAGUENAU
France
Tel : (0033) 3 88 07 15 50
Fax : (0033) 3 88 07 15 51
Internet : http://www.ersa-france.com <http://www.ersa-france.com>
---------------------------------------------------
------------------------------------------------------------------------
_______________________________________________
Mico-devel mailing list
http://www.mico.org/mailman/listinfo/mico-devel
--
Karel Gardas ***@objectsecurity.com
ObjectSecurity Ltd. http://www.objectsecurity.com
Loading...