afs_mp
afs_mp

Reputation: 77

IDL compile Error

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 ();


  };
};

Upvotes: 1

Views: 550

Answers (1)

Johnny Willemsen
Johnny Willemsen

Reputation: 3002

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.

Upvotes: 1

Related Questions