0

I'm using VS 2008 Pro. I have 1 idl file which contains:

module views {

    // Introduced in DOM Level 2:
    interface [
        ObjCCustomImplementation,
        OmitConstructor
    ] AbstractView {
        readonly attribute Document document;
        readonly attribute Media styleMedia;
    };

}

(That's all, no more in the file.) When I build the file (right click to file and press Compile, error occurs as following:

AbstractView.idl ..\page\AbstractView.idl(30) : error MIDL2025 : syntax error : expecting a type specification near "interface" ..\page\AbstractView.idl(31) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation

What is the problem? How can I fix this?

David Brabant
  • 41,623
  • 16
  • 83
  • 111

2 Answers2

0

Maybe it should be other way. As far as I remember, first you must define attributes, then interface itself. This link can be useful.

besworland
  • 747
  • 2
  • 7
  • 17
  • I try to use attribute as followed: module views { // Introduced in DOM Level 2: [ uuid(ba209999-0c6c-11d2-97cf-00c04f8eea45), version(1.0) ] interface AbstractView { readonly attribute Document document; readonly attribute Media styleMedia; }; } But the same error occurs – Chu Xuan Khoi Aug 17 '12 at 07:27
  • It can be so that you are using interface in a wrong way. How do you import it? Could you please show a bit more of your code? – besworland Aug 17 '12 at 07:48
  • In fact, I don't know much about idl. I'm porting WebKit and met the problem. It is sent when building MIDL. I really don't understand about this. – Chu Xuan Khoi Oct 11 '12 at 06:53
  • Well, the problem with IDL-compiler is that all its error messages are too abstract. So, you must be able to recognise the situation when this message can appear. As I wrote previously post complete code of your idl-module, maybe together we will find an error :) – besworland Oct 11 '12 at 06:57
  • besworland, thank you so much. I'm so sorry about my stupid. In fact, quoted source code above is all in the file. I will investigate source code more and try to find the way to describe to you. Thanks again. – Chu Xuan Khoi Oct 11 '12 at 07:29
0

That might be a CORBA IDL file rather than a MIDL file.

Matt
  • 253
  • 3
  • 9