Intel Compiler missing some info for compiling COM server created with VS2005

Intel Compiler missing some info for compiling COM server created with VS2005

I am trying to do a side by side comparison of the MS and Intel compilers as part ofmy testing of Parallel studio and the COM server portion of my project has 76 warnings and 3 errors. (microsoft compiler 0) It seems that some microsoft macros and not defined. For example one error is

at a ms boilerplate line in the Com component (I called it robot) so in robot.h line 77
DECLARE_PROTECT_FINAL_CONSTRUCT() the compiler says error: identifier "InternalAddRef" is undefined

I have tried toinclude a zip file with a very simple Solution (the COM component and a console client ) that mimics my architecture. (let me know if it is not there)

The project was originally created in VS2005 and imported to VS2008

The original project was created using the ATL template wizard. p 582 of Tom Archers Book Visual C++ .Net Bible

If I use the same wizard (which now has fewer options) It works find with theIntel compiler

AttachmentSize
Downloadapplication/zip R2ServMod7.zip47.14 KB
4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Quoting - schedman
I am trying to do a side by side comparison of the MS and Intel compilers as part ofmy testing of Parallel studio and the COM server portion of my project has 76 warnings and 3 errors. (microsoft compiler 0) It seems that some microsoft macros and not defined. For example one error is

at a ms boilerplate line in the Com component (I called it robot) so in robot.h line 77
DECLARE_PROTECT_FINAL_CONSTRUCT() the compiler says error: identifier "InternalAddRef" is undefined

I have tried toinclude a zip file with a very simple Solution (the COM component and a console client ) that mimics my architecture. (let me know if it is not there)

The project was originally created in VS2005 and imported to VS2008

The original project was created using the ATL template wizard. p 582 of Tom Archers Book Visual C++ .Net Bible

If I use the same wizard (which now has fewer options) It works find with theIntel compiler

Looks like a bug in compiler. To workaround the error in line 77 try to modify your class definition:

class ATL_NO_VTABLE CRobot :
public CComObjectRootEx,
public IRobot

Quoting - vadimg

Looks like a bug in compiler. To workaround the error in line 77 try to modify your class definition:

class ATL_NO_VTABLE CRobot :
public CComObjectRootEx,
public IRobot

Thanks for the sugestion. It got by the warning in the Com server part of the code butnow the COM registration step fails. If you try compilethe test console client is missing a file r2server.tlhwhen I use the Intel compiler. Microsoft seems to be hiding some defaults.

Hello there,
This is just a reminder, the Intel C++ Compiler 11.x/10.x do not support "attributed code".

So when you create a project using wizard, you should make sure not to check the "attribute" box.

For this program, it contains attributes. So the work-around is to recreate the project without attribute or build the attributed code with VC.

Jennifer

Leave a Comment

Please sign in to add a comment. Not a member? Join today