2016-01-13 147 views
0

我刚刚安装了Visual Studio Community 2015(版本14.0.24720.00),并尝试创建基于MFC对话框的项目。 在向导中,我只选择了“基于对话框”,将所有其他设置保留为默认设置。Visual Studio Community 2015 MFC空项目无法编译

该项目根本无法编译,这不完全是一个有前途的起点......

我俯瞰的东西吗? MFC模板是否损坏?

下面是我得到的编译时错误(为了易读性,我剪掉了长路径)。

谢谢你的时间。

program files (x86)\microsoft visual studio 14.01>------ Build started: Project: MFCApplication, Configuration: Debug Win32 ------ 

1> stdafx.cpp 

1>c:\[...omissis...]\atlcore.h(639): error C2065: 'LOAD_LIBRARY_SEARCH_SYSTEM32': undeclared identifier 

1>c:\[...omissis...]\uianimation.h(2621): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxanimationhelper.h(411): error C2065: 'UI_E_VALUE_NOT_SET': undeclared identifier 

1>c:\[...omissis...]\afxanimationhelper.h(441): error C2065: 'UI_E_VALUE_NOT_SET': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2103): error C3646: 'm_pConfigs': unknown override specifier 

1>c:\[...omissis...]\afxwin.h(2103): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxwin.h(2024): error C2065: 'GC_PAN_WITH_GUTTER': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2024): error C2065: 'GC_PAN_WITH_INERTIA': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2088): error C2065: 'GC_ALLGESTURES': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2030): error C2065: 'GID_ZOOM': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2030): error C2065: 'GC_ZOOM': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2036): error C2065: 'GID_ROTATE': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2036): error C2065: 'GC_ROTATE': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2042): error C2065: 'GID_TWOFINGERTAP': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2042): error C2065: 'GC_TWOFINGERTAP': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2056): error C2065: 'GID_PAN': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2056): error C2065: 'GC_PAN': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2062): error C2065: 'GID_PAN': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2062): error C2065: 'GC_PAN_WITH_SINGLE_FINGER_VERTICALLY': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2068): error C2065: 'GID_PAN': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2068): error C2065: 'GC_PAN_WITH_SINGLE_FINGER_HORIZONTALLY': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2074): error C2065: 'GID_PAN': undeclared identifier 

1>c:\[...omissis...]\afxw 
in.h(2074): error C2065: 'GC_PAN_WITH_GUTTER': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2080): error C2065: 'GID_PAN': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2080): error C2065: 'GC_PAN_WITH_INERTIA': undeclared identifier 

1>c:\[...omissis...]\afxwin.h(2964): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxwin.h(2964): error C3646: 'GetCurrentGestureInfo': unknown override specifier 

1>c:\[...omissis...]\afxwin.h(2964): error C2059: syntax error: ')' 

1>c:\[...omissis...]\afxwin.h(2965): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 

1>c:\[...omissis...]\afxwin.h(3020): error C2061: syntax error: identifier 'PTOUCHINPUT' 

1>c:\[...omissis...]\afxwin.h(3030): error C2061: syntax error: identifier 'PTOUCHINPUT' 

1>c:\[...omissis...]\afxwin.h(3043): error C3646: 'm_pCurrentGestureInfo': unknown override specifier 

1>c:\[...omissis...]\afxwin.h(3043): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxwin.h(4141): error C2061: syntax error: identifier 'TBPFLAG' 

1>c:\[...omissis...]\afxwin.h(5447): error C2143: syntax error: missing ';' before '*' 

1>c:\[...omissis...]\afxwin.h(5447): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxwin.h(5447): error C2238: unexpected token(s) preceding ';' 

1>c:\[...omissis...]\afxglobals.h(315): error C2143: syntax error: missing ';' before '*' 

1>c:\[...omissis...]\afxglobals.h(315): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxglobals.h(315): error C2238: unexpected token(s) preceding ';' 

1>c:\[...omissis...]\afxadv.h(244): error C2143: syntax error: missing ';' before '*' 
1>c:\[...omissis...]\afxadv.h(244): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 

1>c:\[...omissis...]\afxadv.h(245): error C2334: unexpected token(s) preceding '{'; skipping apparent function body 

1>c:\[...omissis...]\afxadv.h(314): error C2061: syntax error: identifier 'KNOWNDESTCATEGORY' 

1>c:\[...omissis...]\afxadv.h(390): error C2065: 'ICustomDestinationList': undeclared identifier 

1>c:\[...omissis...]\afxadv.h(390): error C2923: 'ATL::CComPtr': 'ICustomDestinationList' is not a valid template type argument for parameter 'T' 

1>c:\[...omissis...]\afxadv.h(273): error C2039: 'AbortList': is not a member of 'ATL::_NoAddRefReleaseOnCComPtr<T>' 

1>c:\[...omissis...]\afxadv.h(428): error C2065: 'IApplicationDestinations': undeclared identifier 

1>c:\[...omissis...]\afxadv.h(428): error C2923: 'ATL::CComPtr': 'IApplicationDestinations' is not a valid template type argument for parameter 'T' 

1>c:\[...omissis...]\afxadv.h(430): warning C4624: 'CAppDestinations': destructor was implicitly defined as deleted 

========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 
+0

第一个错误是在该行'返回(:: LoadLibraryExW(pszLibrary,NULL,LOAD_LIBRARY_SEARCH_SYSTEM32));',即有条件通过'的#if排除箱(_ATL_NTDDI_MIN> NTDDI_WIN7)'在线之上。无论如何,该常量在我的系统中的'C:\ Program Files(x86)\ Windows Kits \ 8.1 \ Include \ um'中找到的'libloaderapi.h'中定义。你有这个文件吗(我想你会这样做,否则错误会不一样)?哪里? –

+0

嗨弗拉德。 是的,我在我的系统上有该文件,并且该文件夹位于此项目的“包含目录”(评估值)中。 我看到的定义在管线410 的#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 什么是错在VS的配置,我认为(我用的,因为昨天VS2009 :() 感谢您的时间 –

+0

这似乎是一个问题从VS2008设置继承... –

回答

0

已解决。 Visual Studio 2015继承了Visual Studio 2009设置。 删除包含文件夹

C:\ Program Files文件\微软的SDK \的Windows \ v6.0A \包含

一切开始正常工作

0

有类似的问题将向前2010至2015年跟踪问题直至targetver.h文件。它正在定义较旧版本的Windows。用当前的默认值替换所有以前的定义。

target.h 
    // delete everything here 
    #include <SDKDDKVer.h> 

-- end of target.h 
0

也许这可以帮助您解决您的问题。 在Visual Studio 2015中,默认情况下不再安装C++工具。相反,C++编译器,库和项目模板已被移入可选功能。启动安装程序后,您可以选择“典型”或“自定义”安装; 如果您选择“Typical”,那么您将无法使用Visual Studio进行C++开发,因为只安装了托管语言和Web开发工具。 Setup Changes in Visual Studio 2015 Affecting C++ Developers

相关问题