BUG: "LNK2005" linker error message when you build the TextInterpreter sample project (832729)
The information in this article applies to:
- Microsoft Visual C++ 2005 Express Edition
- Microsoft Visual C++ .NET (2003)
- Microsoft Visual C++ .NET (2002)
- Microsoft Visual Studio Industry Partner Software Development Kit
Note Microsoft Visual C++ .NET 2002 and Microsoft Visual C++ .NET 2003 support both the managed code model that is provided by the Microsoft .NET Framework and the unmanaged native Microsoft Windows code model. The information in this article applies only to unmanaged Visual C++ code. Microsoft Visual C++ 2005 supports both the managed code
model that is provided by the Microsoft .NET Framework and the unmanaged native
Microsoft Windows code model. SYMPTOMSWhen you build the TextInterpreter sample project that is
included with the Microsoft Visual Studio Industry Partner Software
Development Kit (VSIP SDK), you may receive the following linker error message:
LNK2005: "long __stdcall ATL::AtlWinModuleInit(struct
ATL::_ATL_WIN_MODULE70 *)"
(?AtlWinModuleInit@ATL@@YGJPAU_ATL_WIN_MODULE70@1@@Z) already defined in
ad2de.lib(dbgmetric.obj) CAUSEThe Use of ATL configuration property is incorrectly set to
Not Using ATL in the TextInterpreter sample project although it is a
Microsoft Active Template Library (ATL) project.
RESOLUTIONChange the Use of ATL
configuration property from Not Using ATL to Dynamic Link to ATL. To do
this, follow these steps:
- Install the Microsoft Visual Studio Industry Partner Software
Development Kit (VSIP SDK).
- Start Microsoft Visual Studio .NET 2002, Microsoft Visual Studio .NET 2003, or Microsoft Visual Studio 2005.
- On the File menu, point to
Open, and then click Project.
- In the Open Project dialog box, locate the TextInterpreter sample project that is installed on your
computer where you installed the VSIP SDK samples.
You can find the
TextInterpreter sample in the Installed Path\Microsoft Visual Studio Debugging SDK\Debugging SDK Samples\Text Interpreter Sample directory. Installed Path is a placeholder for the drive where the VSIP SDK is installed. - Click to select the TextInterpreter project or workspace
file, and then click Open.
- In the Visual C++ Project dialog box, click Yes to convert the project to the format that
Visual Studio .NET or Visual Studio 2005 uses.
- In Solution Explorer, right-click
the TextInterpreter project node, and then click
Properties.
- In the TextInterpreter Property Pages
dialog box, expand Configuration Properties, and then expand C/C++.
- Click General, and then type the path for the include
files of the TextInterpreter sample project in the
Additional Include Directories box.
You can find
these files in the Installed Path\Microsoft Visual Studio Debugging SDK\Includes directory. Installed Path is a placeholder for the drive where the VSIP SDK is installed. - Collapse the C/C++ folder, and then expand
the Linker folder.
- Click General, and then type the directory path for the library
files of the TextInterpreter sample project in the
Additional Library directories box.
You can find
these files in the Installed Path\Microsoft Visual Studio Debugging SDK\Libs directory. Installed Path is a placeholder for the drive where the VSIP SDK is installed. - Collapse the Linker folder, and then click
General in the Configuration Properties
folder.
- Change the Use of ATL property on the
right side from Not Using ATL to Dynamic Link to
ATL.
- Click Apply, and then click
OK to close the TextInterpreter Property
Pages dialog box.
- Press CTRL+SHIFT+B to build the
TextInterpreter sample project. The sample project builds
successfully.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.
Modification Type: | Major | Last Reviewed: | 1/17/2006 |
---|
Keywords: | kberrmsg kbDirectory kbATLServer kbProperties kbMigration kbmigrate kbconversion kbbug KB832729 kbAudDeveloper |
---|
|