IDL compile Error

507 Views Asked by At

I want to compile an IDL file and when I compile the idl there is error that say "syntax error : expecting a type specification near "exception" " I read these links:1,2 and 3 but they didn't help me my OS is windows 10 and my framework is MSVS2008 I tried my code in MSVS2006 and worked there if the problem is from my MIDL compiler how exactly I should fix it? which version of SDK should I install? I try some of them but didn't work.also I import "oaidl.idl" and "ocidl.idl" but didn't work.here is a part of my code:

//import "oaidl.idl";
//import "ocidl.idl";
module Quoter
{
  exception Invalid_Stock_Symbol {};

  interface Stock;

  interface Stock_Factory
  {

    Stock get_stock (in string stock_symbol)
      raises (Invalid_Stock_Symbol);
  };

  interface Stock
  {


    readonly attribute string symbol;

    readonly attribute string full_name;

    double price ();


  };
};
1

There are 1 best solutions below

3
On

This is legal CORBA IDL but this has to be compiled using a CORBA IDL compiler like from TAOX11, sounds that you are compiling it using MIDL which is not a CORBA IDL compiler. For TAO the IDL compiler is called tao_idl, maybe our free CORBA Programmers Guide will help.