DOC: Instructions for Statically Linking to Registrar Code (166717)
The information in this article applies to:
- The Microsoft Active Template Library (ATL) 2.0
- The Microsoft Active Template Library (ATL) 2.1
This article was previously published under Q166717 SUMMARY
The Microsoft Active Template Library (ATL) Help article entitled "Setting
Up a Static Link to the Registrar Code" says the following:
<<<<<<<<<<
At the top of stdafx.h, add the following #define statement:
#define _ATL_STATIC_REGISTRY
>>>>>>>>>>
This causes a series of compiler errors and warnings when you build
for "Win32 Release MinSize":
<<<<<<<<<<
C:\Program Files\DevStudio\VC\ATL\include\atlimpl.cpp(1010) : error
C2259:
'CRegObject' : cannot instantiate abstract class due to following
members:
C:\Program Files\DevStudio\VC\ATL\include\atlimpl.cpp(1010) : warning
C4259: 'long __stdcall IUnknown::QueryInterface(const struct _GUID
&,void
** )' : pure virtual function was not defined
...
>>>>>>>>>>
Go into Project/Settings and click on the C++ tab. Under "Preprocessor
definitions," replace _ATL_DLL with _ATL_STATIC_REGISTRY.
If the project was built using the "ATL COM AppWizard," you can also just
pick "Win32 Release MinDependency," which already has the correct
preprocessor definitions set for statically linking to the Registrar code.
Modification Type: | Major | Last Reviewed: | 10/2/2003 |
---|
Keywords: | kbdocerr kbdocfix kbDTL kberrmsg kbRegistry KB166717 |
---|
|