ATL Library: Warning LNK4254 and LNK4078

I am doing a project using Visual C ++ 2010 under Windows 7. I need to use the ATL library, in fact I installed the Windows WDK (version 7600.16385.1) In particular, I use the following libraries from WDK

  • setupapi.lib
  • atls.lib
  • atlsd.lib
  • atl.lib
  • atlthunk.lib

Compiling my code I have the following warnings:

atls.lib (stdafx.obj): warning LNK4254: section "ATL" (50000040), combined with ".rdata" (40000040) with different attributes

atls.lib (stdafx.obj): warning LNK4078: several "ATL" sections found with different attributes (40301040)

Does anyone know how to fix this? I am worried about possible memory leaks or some problems with accessing my data. Thanks

+8
c ++ windows visual-c ++ atl wdk
source share
1 answer

I had the same warnings with Visual Studio 2010 Express Edition and ATL taken from WDK 7.1. It seems that atl libs were built with different options than your project takes with atlbase.h. I changed the settings in atlbase.h

#pragma section("ATL$__a", read, shared) => #pragma section("ATL$__a", read) #pragma section("ATL$__z", read, shared) => #pragma section("ATL$__z", read) #pragma section("ATL$__m", read, shared) => #pragma section("ATL$__m", read) 

and there were no warnings.

+9
source share

All Articles