Reputation: 159
I am making a project using Visual C++ 2010 under Windows 7. I need to use ATL library, in fact I installed Windows WDK (version 7600.16385.1) In particular I using the following libraries from WDK
Compiling my code I have the following warnings:
atls.lib(stdafx.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
atls.lib(stdafx.obj) : warning LNK4078: multiple 'ATL' sections found with different attributes (40301040)
Does anyone know how to fix it? I am worried of possible memory leaks or having some problem to access my data. Thanks
Upvotes: 9
Views: 3612
Reputation: 101
I had the same warnings with Visual Studio 2010 Express Edition and the ATL taken from WDK 7.1. It seems that the atl libs were built with different options than your project takes from 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 the warnings were gone.
Upvotes: 10