当我在 Visual Studio 2008 SP1 中使用 ATL 标头创建一个新的 Win32 项目(Windows 应用程序)时,仅包含<atlbase.h>
给我这个警告:
TempATL.obj : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
当我还包含<atlapp.h>
来自 WTL 时,我会收到以下额外警告:
atlsd.lib(Externs.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
atlsd.lib(AtlDebugAPI.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
atlsd.lib(Allocate.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
atlsd.lib(atltrace.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
atlsd.lib(AtlTraceModuleManager.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
解决这些警告的正确方法是什么?
编辑:
我刚刚发现这些正在发生,因为我已将 Visual Studio 2008 切换为将 Visual C++ 2010编译器与 2008库一起使用。如果有人知道如何解决这个问题,而不是切换回旧的编译器,那么请发帖。:)