View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016007CMakeCCMakepublic2016-03-04 05:472016-06-10 14:31
ReporterAnatoly Shirokov 
Assigned ToKitware Robot 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionmoved 
Platformx86OSWindows OS Version7 Prof 64 bit
Product VersionCMake 3.4.3 
Target VersionFixed in Version 
Summary0016007: Visual Studio 2015 + v110_xp toolset + MFC: rerun cmake 3.5.0-rc3 inside Visual Studio breaks compilation
DescriptionWhen I change CMakeLists.txt inside Visual Studio 2015 and try to rebuild my solution, I get complication errors:
Error C2039: 'SetDefaultDllDirectories' : is not a member of '`global namespace'' c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 638 1
Error C2065: 'SetDefaultDllDirectories' : undeclared identifier c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 638 1
Error C2065: 'LOAD_LIBRARY_SEARCH_SYSTEM32' : undeclared identifier c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 640 1
Steps To Reproduce1. generate mfc project

>call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC"\vcvarsall.bat x86

>set PATH=%VCINSTALLDIR%\bin;C:\Program Files (x86)\CMake 3.5\bin;%PATH%;

>cmake --version
cmake version 3.5.0-rc3

>cmake -G "Visual Studio 14 2015" -T v110_xp ..\src

2. open the solution in Visual Studio 2015

3. build the solution without any errors

4. change CMakeLists.txt

5. rebuild the solutions and get errors:
Error C2039: 'SetDefaultDllDirectories' : is not a member of '`global namespace'' c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 638 1
Error C2065: 'SetDefaultDllDirectories' : undeclared identifier c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 638 1
Error C2065: 'LOAD_LIBRARY_SEARCH_SYSTEM32' : undeclared identifier c:\program files (x86)\microsoft visual studio 14.0\vc\atlmfc\include\atlcore.h 640 1
Additional InformationI have found the feedback related to this problem: https://connect.microsoft.com/VisualStudio/feedback/details/773422/compiler-error-when-using-v110-xp-platform-toolset-visual-studio-2012 [^]

There is a workaround posted by Wouter_Demuynck on 17.12.2012 at 4:07:
I noticed that selecting the v110_xp toolset in the process properties did not automatically enable the _USING_V110_SDK71_ preprocessor flag.

After manually adding the following define at the top of my stdafx.h, the project compiled fine:

#define _USING_V110_SDK71_

I have added #define _USING_V110_SDK71_ to my CMakeFiles.txt, and it solved the problem, but may be there is more elegance solution?
TagsNo tags attached.
Attached Fileslog file icon CMakeError.log [^] (2,990 bytes) 2016-03-04 06:22

 Relationships

  Notes
(0040596)
Anatoly Shirokov (reporter)
2016-03-04 06:04
edited on: 2016-03-04 06:22

Sorry, I use the following command:
>cmake -G "Visual Studio 14 2015" -t v110_xp ..\src

Because "cmake -G "Visual Studio 14 2015" -T v110_xp ..\src" does not generate project (see the attached CMakeError.log file):

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.CppCommon.targets(644,9): error MSB4030: "Debug" - invalid parameter value "GenerateDebugInformation" task "Link". Parameter "GenerateDebugInformation" relates to "System.Boolean". [H:\src\CURRENT\vs151\CMakeFiles\CMakeTmp\cmTC_9e17b.vcxproj]

(0040641)
Brad King (manager)
2016-03-07 11:38

The problem observed in 0016007:0040596 is 0015986.
(0040649)
Anatoly Shirokov (reporter)
2016-03-08 14:04
edited on: 2016-03-08 14:06

Thank you so much Brad! Is your patch included to the 3.5.0 release? I have tested 3.5.0-rc3 and the 3.5.0-rc3 does not works.

(0040650)
Brad King (manager)
2016-03-08 14:15

Re 0016007:0040649: Yes, that fix is in 3.5.0.
(0042958)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-03-04 05:47 Anatoly Shirokov New Issue
2016-03-04 06:04 Anatoly Shirokov Note Added: 0040596
2016-03-04 06:20 Anatoly Shirokov Note Edited: 0040596
2016-03-04 06:22 Anatoly Shirokov File Added: CMakeError.log
2016-03-04 06:22 Anatoly Shirokov Note Edited: 0040596
2016-03-07 11:38 Brad King Note Added: 0040641
2016-03-08 14:04 Anatoly Shirokov Note Added: 0040649
2016-03-08 14:06 Anatoly Shirokov Note Edited: 0040649
2016-03-08 14:15 Brad King Note Added: 0040650
2016-03-09 02:20 Anatoly Shirokov Note Added: 0040651
2016-03-09 03:03 Anatoly Shirokov Note Deleted: 0040651
2016-06-10 14:29 Kitware Robot Note Added: 0042958
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team