Hello,
I am new to Component Object Model (COM) and am having a difficult
time understanding the concepts, let alone the code.
I was trying to compile a simple example from a book. The project
name is "ATL". The compiler is issuing the following error message:
error C2370: 'LIBID_ATLLib' : redefinition; different storage class
atlbase.h(79) : see declaration of 'LIBID_ATLLib'
This is the line in the "ATL_i.c" (generated by the compiler)
triggering the error C2370:
const IID LIBID_ATLLib =
{0x462414AC,0xF1F1,0x47FA,{0xA6,0x25,0x0A,0xF4,0x91,0x0A,0x3B,0xEE}};
The declaration of 'LIBID_ATLLib' in the atlbase.h is
extern "C" const __declspec(selectany) GUID LIBID_ATLLib =
{0x44EC0535,0x400F,0x11D0,{0x9D,0xCD,0x00,0xA0,0xC9,0x03,0x91,0xD3}};
What is causing this error and how can it be fixed? Thanks for your
help.
RESOLUTION
==========
1. In the <project_name>.idl file change the name of the library from
ATLLib to something else.
2. Do not use 'ATL' for your project name.
yhhuang
ICQ:91074870