John Guest
|
Posted: Tue Aug 30, 2005 4:34 pm Post subject: E2238 Multiple declaration for |
|
|
I am using BCB6.
I have a Type Library with an interface to a com object.
In my TLB.cpp I have
// *********************************************************************//
// GUIDS declared in the TypeLibrary
// *********************************************************************//
const GUID LIBID_EMSERVICELib = {0x28A5CF74, 0x12A6, 0x11D3,{ 0xA2, 0xBF,
0x00, 0x60, 0x97, 0x83, 0x9E, 0x22} };
const GUID CLSID_CxClientClerk = {0xFEBFD8D2, 0x12C5, 0x11D3,{ 0xA2, 0xBF,
0x00, 0x60, 0x97, 0x83, 0x9E, 0x22} };
const GUID IID_ICxClientApplication = {0x4E3865C1, 0x96FC, 0x11D3,{ 0xAF,
0x50, 0x00, 0x60, 0x97, 0x83, 0xA4, 0x3E} };
In my TLB.h I have
extern "C" const __declspec(selectany) GUID LIBID_EMSERVICELib =
{0x28A5CF74, 0x12A6, 0x11D3,{ 0xA2, 0xBF, 0x00,0x60, 0x97, 0x83,0x9E,
0x22} };
extern "C" const __declspec(selectany) GUID IID_ICxClientApplication =
{0x4E3865C1, 0x96FC, 0x11D3,{ 0xAF, 0x50, 0x00,0x60, 0x97, 0x83,0xA4,
0x3E} };
extern "C" const __declspec(selectany) GUID IID_ICxClientTool = {0x00043761,
0x96DF, 0x11D3,{ 0xAF, 0x4F, 0x00,0x60, 0x97, 0x83,0xA4, 0x3E} };
Which causes the compiler to complain
[C++ Error] EMSERVICELib_TLB.cpp(43): E2238 Multiple declaration for
'LIBID_EMSERVICELib'
[C++ Error] EMSERVICELib_TLB.h(77): E2344 Earlier declaration of
'LIBID_EMSERVICELib'
[C++ Error] EMSERVICELib_TLB.cpp(43): E2178 VIRDEF name conflict for
'LIBID_EMSERVICELib'
[C++ Error] EMSERVICELib_TLB.cpp(44): E2238 Multiple declaration for
'CLSID_CxClientClerk'
[C++ Error] EMSERVICELib_TLB.h(94): E2344 Earlier declaration of
'CLSID_CxClientClerk'
This code is generated by BCB6. How do I get it to stop doing the multiple
declarations?
Thanks
John
|
|