BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

E2238 Multiple declaration for

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX)
View previous topic :: View next topic  
Author Message
John
Guest





PostPosted: Tue Aug 30, 2005 4:34 pm    Post subject: E2238 Multiple declaration for Reply with quote



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


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (ActiveX) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.