PRB: ATL Project Named "ATL" Fails to Build (198018)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 3.0, when used with:
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2003)
This article was previously published under Q198018 SYMPTOMS When you build an ATL project with the name 'ATL' you will
C2370: 'LIBID_ATLLib' : redefinition; different storage class
c:\program files\microsoft visual studio\vc98\atl\include\atlbase.h(79) : see
declaration of 'LIBID_ATLLib' The project can be an inproc server,
local server or service and the project name's case does not matter.
In Visual Studio .NET you receive the following error message:
ATL_i.obj : error LNK2005: _LIBID_ATLLib already defined
in stdafx.obj ATL_i.obj : warning LNK4006: _LIBID_ATLLib already defined in
stdafx.obj; second definition ignored Creating library Debug/ATL.lib and
object Debug/ATL.exp Debug/ATL.dll : fatal error LNK1169: one or more multiply
defined symbols found CAUSE When you create a ATL project with the name 'ATL', the type
library is give a name ATLLib and the midl generated header files generates a
GUID named LIBID_ATLLib. This GUID name is already used in the ATL header files
and so the redefinition error. ATL uses the GUID name for the registrar object
and the control containment code. RESOLUTION- In the <project_name>.idl file change the name of the
library from
ATLLib to something else. - Do not use 'ATL' for your project name.
Modification Type: | Major | Last Reviewed: | 9/12/2003 |
---|
Keywords: | kbprb KB198018 |
---|
|