[PolyORB-users] Problem with polyorb 2.5 and iac
Ramon Perez Casado
ramonperezcasado at gmail.com
Fri Sep 5 08:37:51 CEST 2008
<polyorb-users at lists.adacore.com>Hi
I'am using PolyOrb 2.5 and Gant 6.1.2 for linux Red Hat .
I have a problem with a idl's that contain unions :
For example:
*module prueba
{
enum prueba_enum
{
A,
B,
C
};
union prueba_variant_record switch(prueba_enum)
{
case A :
string a_string;
case B :
string b_string;
//case C :
// string c_string;
default:
char default_char[256];
};
};*
This example after compile with iac "iac prueba.idl"
*pragma Style_Checks ("NM32766");
---------------------------------------------------
-- This file has been generated automatically from
-- prueba.idl
-- by IAC (IDL to Ada Compiler) 2.5.0w (rev. unknown).
---------------------------------------------------
-- Do NOT hand-modify this file, as your
-- changes will be lost when you re-run the
-- IDL to Ada compiler.
---------------------------------------------------
with PolyORB.Std;
with CORBA;
pragma Elaborate_All (CORBA);
package prueba is
Repository_Id : constant PolyORB.Std.String :=
"IDL:prueba:1.0";
type prueba_enum is
(A,
B,
C);
prueba_enum_Repository_Id : constant PolyORB.Std.String :=
"IDL:prueba/prueba_enum:1.0";
type default_char_Array is
array (0 .. 255) of CORBA.Char;
default_char_Array_Repository_Id : constant PolyORB.Std.String :=
"IDL:prueba/default_char_Array:1.0";
type prueba_variant_record
(Switch : prueba.prueba_enum := prueba.prueba_enum'First)
is
record
case Switch is
when prueba.A =>
a_string : CORBA.String;
when prueba.B =>
b_string : CORBA.String;
when prueba.<> =>
default_char : prueba.default_char_Array;
pragma Warnings (Off);
when others =>
null;
pragma Warnings (On);
end case;
end record;
prueba_variant_record_Repository_Id : constant PolyORB.Std.String :=
"IDL:prueba/prueba_variant_record:1.0";
end prueba;*
In the type prueba_variant_record define
* "when prueba.<> =>
default_char: prueba.default_char_Array;"*
But when I compile this source I obtain this compile error.
*gnatmake prueba.ads '$POLYORB_DIR/bin/polyorb-condif'
gcc -c -I/usr/local/polyorb_2.5/include/polyorb prueba.ads
prueba.ads:43:25: selector expected
prueba.ads:44:28: missing "=>"
Gnatmake: "prueba.ads" compilation error*
Anybody can I explain me what it's the problem?.
Thaks for all and sorry by my english writing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/polyorb-users/attachments/20080905/f4d8f502/attachment.htm
More information about the PolyORB-users
mailing list