Could you send me instruction to configure WTL on visual studio express 2010. Is it possible, legal?
I downloaded the latest WTL from svn.
To have access to ATL downloaded Windows Driver Kit Version 7.1.0.
I created default WTL application from wizard.
After settings all paths I was able to compile link and run application. But below linker warning means that application may crash in any time....
atlsd.lib(atlcommodule.obj) : warning LNK4078: multiple 'ATL' sections found with different attributes (40301040)
1>stdafx.obj : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>WtlDefault.obj : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(externs.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atldebugapi.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atltrace.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atlbase.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atlfuncs.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atlcommodule.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(stdafx.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(allocate.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
1>atlsd.lib(atltracemodulemanager.obj) : warning LNK4254: section 'ATL' (50000040) merged into '.rdata' (40000040) with different attributes
Anonymous
Instructions are very simple: Add to include directories for VC++ Express directories for WTL and ATL included in WDK 7.1.0, and also libraries from WDK. I think this is legal.
Warnings are because ATL files from WDK are older that VS2010 files, and define ATL sections differently. In atlbase.h:
pragma section("ATL$__a", read, shared)
pragma section("ATL$__z", read, shared)
pragma section("ATL$__m", read, shared)
If you change that to:
pragma section("ATL$__a", read)
pragma section("ATL$__z", read)
pragma section("ATL$__m", read)
everything will be OK.
If you don't want to modify atlbase.h, you can ignore these warning, I don't think they can cause any real problem. You can also suppress them by adding /ignore:4254 to the linker command line.
Unfortunately, WTL cannot do anything to fix this.