Debug Assertion Failed with the Default ATL Project Created by Microsoft* Visual Studio 2013*

Reference number: DPD200253712

Affected products:

  • Intel C++ Composer XE 2013 for Windows SP1 update 1 and update 2 with Microsoft Visual Studio 2013*

Problem description:
The assertion happens for the "debug" configuration only.

If you build an ATL DLL using Intel C++ compiler within Visual Studio 2013, and register it, you might see an error message like below:

You may see the same error when you run a MFC program built by Intel C++ Compiler with Visual Studio 2013.

This issue is caused by the pragma "__declspec(selectany)" that is added to "atltrace.h" of Visual Studio 2013 line 96:

__declspec(selectany) CTraceCategoryEx<CTraceCategoryEx<>::TraceGeneral> atlTraceGeneral(_T("atlTraceGeneral"));

Resolution:

We are aware of this issue and the importance. It has been worked on.

For the atl dll registration case there is no workaround for it. This article will be updated when a workaround is discovered or a fix is available. Sorry for the inconvenience.

For the MFC program case, the workaround is to make sure to "use precompiled header" for all the .cpp files. You can set all the .cpp files to "use precompiled header" in following steps:

  1. hold [ctrl] and left-click on all the .cpp files
  2. right-click on one selected file and select "Properties"
  3. open "C/C++ > Precompiled Header": select "Use (/Yu)"
For more complete information about compiler optimizations, see our Optimization Notice.