I think this is well-known problem. I created a sample MFC project on Visual C++ w/ 64-bit compiler tool chains (tested both on Windows 7 and Windows Vista 64-bit).
When I try to compile x64 configuration, I get this error:
1>testDoc.cpp 1>Catastrophic error: unable to obtain mapped memory (see pch_diag.txt)
However, there is no such pch_diag.txt.
So far, the workaround for this is disabling "precompiled header" by tweaking /Yx, /Yu /Yc options. It works then. However, this workaround is very undesirable because disabling precompiled header significantly decreases compile time.
Interestingly, 32-bit compiler works just fine. I can just use precompiled header. However, only in 64-bit configuration, I get failed.
I'm using the latest Intel C++ (11.1.048). But, still this problem has not been fixed.
Thanks. Here is the steps to reproduce the problem.
1. On Windows Vista / Windows 7 64-bit, Visual Studio 2008 w/ Service Pack 1 and did all Windows updates. But, not installed Windows 7.0 SDK. Finally, install Intel C++/Fortran suite w/ Visual Studio integration. This is a typical system configuration. Nothing special at here.
2. Run VC++ 2008, and create a sample MFC (just whatever) application.
3. Create x64 build configuration (by default, there is only Win32 configuration).
4. Convert to Intel C++ mode.
5. Build the solution.
1>------ Rebuild All started: Project: test, Configuration: Debug x64 ------ 1>Deleting intermediate files and output files for project 'test', configuration 'Debug|x64'. 1>Compiling resources... (Microsoft VC++ Environment) 1>Microsoft Windows Resource Compiler Version 6.1.6723.1 1> 1>Copyright (C) Microsoft Corporation. All rights reserved. 1> 1> 1>Compiling with Intel C++ 11.1.048 [Intel 64]... (Intel C++ Environment) 1>stdafx.cpp 1>Compiling with Intel C++ 11.1.048 [Intel 64]... (Intel C++ Environment) 1>ViewTree.cpp 1>FileView.cpp 1>Catastrophic error: unable to obtain mapped memory (see pch_diag.txt) 1> 1>compilation aborted for .FileView.cpp (code 4) 1>Build Time: 0:00:23 1>test - 0 error(s), 0 warning(s)
6. Got error. As you can see, icl can make precompiled header. It creates "test.pchi" (100MB) in the intermediate directory of the project. However, the other source files, which use the precompiled header by default, cannot be proceeded. And, I can't find any pch_diag.txt. I searched entire hard drives.
I did the following workarounds:
1. Disabling /Yx options. Yes, it's working, but that disables precompiled header. If a solution has 100s source files, the compilation time would be significantly.
2. Changing compatibility mode of icl.exe. Tried, but not working. Actually, in Windows 7, the compatibility dialog box only shows Windows Vista, no Windows XP.
Yap, (1) solves the problem anyway. But, I really want to turn on precompiled header option.
Hi there, Have done the following: 1) contacted msdn.com, 2)tried other compilers, 3)not using MFC but only win 32 application, 4)checked for the appropriate syntaxes such as those postfixed with "Ex",e.g CreateWindowEx().