View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011224CMakeCMakepublic2010-09-13 08:412012-04-02 10:10
ReporterThomasZymara 
Assigned ToDavid Cole 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionCMake 2.8.7Fixed in VersionCMake 2.8.7 
Summary0011224: Visual-Studo-2010 cannot interpret set (CMAKE_MFC_FLAG 2) => unable to compile project
DescriptionIs "set (CMAKE_MFC_FLAG 2)" set
Visual-Studio-2010 is unable to compile the project - error is:
             #error : Building MFC application with /MD[d] (CRT dll version)
                       requires MFC shared dll version. Please #define _AFXDLL
                        or do not use /MD[d] C:\Programme\Microsoft Visual
                        Studio 10.0\VC\atlmfc\include\afx.h

Reason:
In the project-properties the VS2010 switch "Using MFC" is set to "true", which cannot be interpreted by VS2010 - you have to switch this one to "...using mfc in a dll..."

This is a little bit mysteries, because after switch in VS2010 this switch to the right one, the project-file (....vcxproj) is binary equal - but it is now successful to compile the project
TagsNo tags attached.
Attached Filespatch file icon 0001-BUG-0011224-fixed-MFC-build-in-VS2010.patch [^] (1,387 bytes) 2010-10-09 13:34 [Show Content]
patch file icon 0001-BUG-0011224-fixed-MFC-build-in-VS2010_b.patch [^] (1,397 bytes) 2010-10-18 14:38 [Show Content]

 Relationships
related to 0011213closedDavid Cole VC2010 Generator handles CMAKE_MFC_FLAG incorrectly 
related to 0011638closedKitware Robot ATL support 

  Notes
(0022463)
McBen (reporter)
2010-10-09 13:38

The tag "<UseOfMfc>" has 3 states: false,Static,Dynamic
CMake incorrectly only writes false or true.

I attached a possible patched for that.
(0022524)
McBen (reporter)
2010-10-18 14:40

new patch added.
'cause I missed a NULL_pointer check in my first patch.

( "0001-BUG-0011224-fixed-MFC-build-in-VS2010.patch" can be deleted )
(0024321)
David Cole (manager)
2010-12-22 09:46

Here's another case where a lack of a test is a contributing factor to the bug going unobserved by CMake developers.

If there were a test that built an MFC project, then the test would fail on Visual Studio 2010 dashboard submissions.
(0025784)
ThomasZymara (reporter)
2011-03-15 10:07

I just verified your fix and it worked
(0027520)
Gunther Laure (reporter)
2011-10-04 05:34

Are we forced to apply this patch on our own or will it be added to a CMake release soon?
(0027722)
David Cole (manager)
2011-11-04 13:43

Fix pushed to 'next':

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=011694c269a1193ec8f7fe8dce8d4a86bcafa8e4 [^]
(0027725)
David Cole (manager)
2011-11-04 13:45

Note also, the MFC test was added and patched up to work on all the dashboard machines in all the commits leading up to this fix commit...
(0029039)
David Cole (manager)
2012-04-02 10:10

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2010-09-13 08:41 ThomasZymara New Issue
2010-10-09 13:34 McBen File Added: 0001-BUG-0011224-fixed-MFC-build-in-VS2010.patch
2010-10-09 13:38 McBen Note Added: 0022463
2010-10-18 14:38 McBen File Added: 0001-BUG-0011224-fixed-MFC-build-in-VS2010_b.patch
2010-10-18 14:40 McBen Note Added: 0022524
2010-12-22 09:40 David Cole Relationship added related to 0011213
2010-12-22 09:42 David Cole Relationship added related to 0011638
2010-12-22 09:46 David Cole Note Added: 0024321
2010-12-22 09:47 David Cole Assigned To => David Cole
2010-12-22 09:47 David Cole Status new => assigned
2011-03-15 10:07 ThomasZymara Note Added: 0025784
2011-10-04 05:34 Gunther Laure Note Added: 0027520
2011-10-21 12:21 David Cole Target Version => CMake 2.8.7
2011-11-04 13:43 David Cole Note Added: 0027722
2011-11-04 13:43 David Cole Status assigned => resolved
2011-11-04 13:43 David Cole Fixed in Version => CMake 2.8.7
2011-11-04 13:43 David Cole Resolution open => fixed
2011-11-04 13:45 David Cole Note Added: 0027725
2012-04-02 10:10 David Cole Note Added: 0029039
2012-04-02 10:10 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team