midl compiler bug - msado15.idl 
Author Message
 midl compiler bug - msado15.idl

Hello everyone,

Here is a little background information.

I have two ATL projects that I am moving from VC6 to VS .NET 2003.
These two projects build in VC++ 6.0 and they work. :)

The first project imports the msado15.idl into it's idl, thus bringing ADO
into the project. The second project #imports the .tlb of the first project,
and therefore gets everything, including ADO , from the first project.

I'm getting the following error when I try and compile the second ATL
project.

error C2146: syntax error : missing ';' before identifier
'PositionEnum_Param'
error C2501: 'PositionEnum_Param' : missing storage-class or type specifiers
error C2371: 'PositionEnum' : redefinition; different basic types
                see declaration of 'PositionEnum'
error C2061: syntax error : identifier 'PositionEnum_Param'

For some reason, IDL definitions are in the wrong order. When you look in
the .tlh file that is generated from #importing the first projects .tlb,
you'll see
that first PositionEnum_Param is typedef'd as PositionEnum, but
PositionEnum is typedef'd AFTER PositionEnum_Param.

cut from .tlh file:
----------------
typedef PositionEnum PositionEnum_Param;
typedef enum __MIDL___MIDL_itf_MRMObjects_0322_0013 PositionEnum;
enum __MIDL___MIDL_itf_MRMObjects_0322_0013;
typedef enum __MIDL___MIDL_itf_MRMObjects_0322_0001 CursorTypeEnum;
enum __MIDL___MIDL_itf_MRMObjects_0322_0001;

If I remove the #import of the .tlb and #include the .tlh file that I alter
to correct the ordering, seems to build ok. That is not the correct
solution.

Has anyone had this problem before? Is this a bug in the MIDL compiler,
or is this a bug in the msado15.idl that is shipped with VS .NET 2003? Is
there something in my code that can correct or cause this behavior?

Thanks in advance,
Dave White
Schlumberger Information Solutions



Tue, 08 Nov 2005 01:04:18 GMT  
 midl compiler bug - msado15.idl
Was a resolution to this error ever found?  I'm doing something similar
(although not using VS.NET) and getting the same error.  I do have VS.NET
installed, however; maybe it's one of those infamous M$ features we've come to
know and love...

--agts

Quote:

> Hello everyone,

> Here is a little background information.

> I have two ATL projects that I am moving from VC6 to VS .NET 2003.
> These two projects build in VC++ 6.0 and they work. :)

> The first project imports the msado15.idl into it's idl, thus bringing ADO
> into the project. The second project #imports the .tlb of the first project,
> and therefore gets everything, including ADO , from the first project.

> I'm getting the following error when I try and compile the second ATL
> project.

> error C2146: syntax error : missing ';' before identifier
> 'PositionEnum_Param'
> error C2501: 'PositionEnum_Param' : missing storage-class or type specifiers
> error C2371: 'PositionEnum' : redefinition; different basic types
>                 see declaration of 'PositionEnum'
> error C2061: syntax error : identifier 'PositionEnum_Param'

> For some reason, IDL definitions are in the wrong order. When you look in
> the .tlh file that is generated from #importing the first projects .tlb,
> you'll see
> that first PositionEnum_Param is typedef'd as PositionEnum, but
> PositionEnum is typedef'd AFTER PositionEnum_Param.

> cut from .tlh file:
> ----------------
> typedef PositionEnum PositionEnum_Param;
> typedef enum __MIDL___MIDL_itf_MRMObjects_0322_0013 PositionEnum;
> enum __MIDL___MIDL_itf_MRMObjects_0322_0013;
> typedef enum __MIDL___MIDL_itf_MRMObjects_0322_0001 CursorTypeEnum;
> enum __MIDL___MIDL_itf_MRMObjects_0322_0001;

> If I remove the #import of the .tlb and #include the .tlh file that I alter
> to correct the ordering, seems to build ok. That is not the correct
> solution.

> Has anyone had this problem before? Is this a bug in the MIDL compiler,
> or is this a bug in the msado15.idl that is shipped with VS .NET 2003? Is
> there something in my code that can correct or cause this behavior?

> Thanks in advance,
> Dave White
> Schlumberger Information Solutions



Tue, 06 Dec 2005 08:08:47 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. dotnet MIDL compiler fails to generate .tlb for DownloadMgr.idl

2. Troubles compiling IDL file using MIDL compiler.

3. midl compiler bug?

4. midl compiler bug?

5. Using _Recordset without #import "msado15.idl"

6. Error Processing msado15.idl

7. MIDL Error, while importing msxml2.idl

8. IDL import issue on old MIDL

9. MIDL on smtpevent.idl error

10. tried to midl dao360.idl

11. VC.NET - MIDL build bug

12. bug in MIDL?

 

 
Powered by phpBB® Forum Software