解决 Cocos2d-x 3.2 error C1041: 无法打开程序数据库vc120.pdb
单个项目解决方案
解决方案是为项目添加 /FS (Force Synchronous PDB Writes) 编译选项,具体位置在:

一劳永逸的解决方案
直接修改cocos的项目模板templates\cpp-template-default\proj.win32\HelloCpp.vcxproj为:
- <?xml version="1.0" encoding="utf-8"?>
- <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|Win32">
- <Configuration>Debug</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|Win32">
- <Configuration>Release</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <ProjectGuid>{76A39BB2-9B84-4C65-98A5-654D86B86F2A}</ProjectGuid>
- <RootNamespace>test_win32</RootNamespace>
- <Keyword>Win32Proj</Keyword>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <CharacterSet>Unicode</CharacterSet>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
- <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
- <PlatformToolset>v120</PlatformToolset>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\cocos2d\cocos\2d\cocos2dx.props" />
- <Import Project="..\cocos2d\cocos\2d\cocos2d_headers.props" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\cocos2d\cocos\2d\cocos2dx.props" />
- <Import Project="..\cocos2d\cocos\2d\cocos2d_headers.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup>
- <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration).win32\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration).win32\</OutDir>
- <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration).win32\</IntDir>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
- <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
- <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <LibraryPath>$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath)</LibraryPath>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>false</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- <DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <AdditionalOptions>/FS %(AdditionalOptions)</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- <PreLinkEvent>
- <Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
- xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
- </PreLinkEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- <Optimization>MaxSpeed</Optimization>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <AdditionalIncludeDirectories>$(EngineRoot)cocos\audio\include;$(EngineRoot)external;$(EngineRoot)external\chipmunk\include\chipmunk;$(EngineRoot)extensions;..\Classes;..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USE_MATH_DEFINES;GL_GLEXT_PROTOTYPES;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- <DisableSpecificWarnings>4267;4251;4244;%(DisableSpecificWarnings)</DisableSpecificWarnings>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- </ClCompile>
- <Link>
- <AdditionalDependencies>libcurl_imp.lib;websockets.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
- <AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- <PreLinkEvent>
- <Command>if not exist "$(OutDir)" mkdir "$(OutDir)"
- xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)"</Command>
- </PreLinkEvent>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClCompile Include="..\Classes\AppDelegate.cpp" />
- <ClCompile Include="..\Classes\HelloWorldScene.cpp" />
- <ClCompile Include="main.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="..\Classes\AppDelegate.h" />
- <ClInclude Include="..\Classes\HelloWorldScene.h" />
- <ClInclude Include="main.h" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\cocos2d\cocos\2d\cocos2d.vcxproj">
- <Project>{98a51ba8-fc3a-415b-ac8f-8c7bd464e93e}</Project>
- <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
- </ProjectReference>
- <ProjectReference Include="..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj">
- <Project>{f8edd7fa-9a51-4e80-baeb-860825d2eac6}</Project>
- </ProjectReference>
- <ProjectReference Include="..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj">
- <Project>{207bc7a9-ccf1-4f2f-a04d-45f72242ae25}</Project>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="game.rc" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
- </Project>
这样不仅解决了这个问题,还能避免每次开新项目时的强制升级。
解决 Cocos2d-x 3.2 error C1041: 无法打开程序数据库vc120.pdb的更多相关文章
- error C2471: 无法更新程序数据库 vc90.pdb
error C2471: 无法更新程序数据库“d:/Work/ Project/debug/vc90.pdb” fatal error C1083: 无法打开程序数据库文件:“d:/Work/ Pro ...
- error C2471: 无法更新程序数据库
这段时间在使用VS做一个项目.在使用过程中,今天遇到了一个问题,也就是题目所说的那样: error C2471: 无法更新程序数据库.之后在网上搜了一下,得到了两种解决方案,两种方案分别如下: (一) ...
- Visual Studio 下error C2471: 无法更新程序数据库
转载请注明来源:https://www.cnblogs.com/hookjc/ 解决方案:修改项目属性 右击项目 --> "属性" 1. "C/C++" ...
- 完美解决VS2003.Net fatal error LNK1201: 写入程序数据库“.pdb”时出错
我的开发环境是Win7旗舰64位+VS2003.Net,经常卡pdb错误,文末给出一个完美的解决方案和一个懒人补丁包.问题描述如下:在重新编译的时候,经常报错: fatal error LNK1201 ...
- 解决:fatal error LNK1104: 无法打开文件“libc.lib”
今天使用VS2017编译比较老的VC++项目,出现了[fatal error LNK1104: 无法打开文件“libc.lib”]的链接器问题,解决方法如下: 项目->属性中->配置属性- ...
- 【转载】重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
重置密码解决MySQL for Linux错误 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using passwor ...
- 解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题
参考: How to install all the boost development libraries? 解决 Boost安装:fatal error: bzlib.h: No such fil ...
- WCF分布式开发常见错误解决(1):An error occurred while attempting to find services at...添加服务引用出错
WCF分布式开发常见错误解决(1):An error occurred while attempting to find services at...添加服务引用出错 当我们在客户端添 ...
- 解决执行脚本报syntax error: unexpected end of file或syntax error near unexpected token `fi'错误的问题
参考:https://blog.csdn.net/u012453843/article/details/69803244 解决执行脚本报syntax error: unexpected end of ...
随机推荐
- MTK UART串口调试
一.UART初始化 1. kernel-3.18/drivers/misc/mediatek/uart/uart.c static int __init mtk_uart_init(void) { ; ...
- bzoj3569
线性基 非常高端 强制在线动态图 我们先搞出一个dfs树,然后所有非树边都和树边形成一个环.我们考虑什么情况会不连通,当且仅当树边和dfs序大于当前点的返祖边都被断掉才不连通,那么我们给每个非树边赋一 ...
- Java中的双重检查(Double-Check)详解
在 Effecitve Java 一书的第 48 条中提到了双重检查模式,并指出这种模式在 Java 中通常并不适用.该模式的结构如下所示: ? 1 2 3 4 5 6 7 8 9 10 public ...
- UVaLive 10859 Placing Lampposts (树形DP)
题意:给定一个无向无环图,要在一些顶点上放灯使得每条边都能被照亮,问灯的最少数,并且被两盏灯照亮边数尽量多. 析:其实就是一个森林,由于是独立的,所以我们可以单独来看每棵树,dp[i][0] 表示不在 ...
- Gym 100851E Easy Problemset (水题,模拟)
题意:给定 n 个裁判,然后每个都一些题目,现在要从每一个按顺序去选出 k 个题,并且这 k 个要按不递减顺序,如果没有,就用50补充. 析:就按他说的来,直接模拟就好. 代码如下: #pragma ...
- Codevs 1043 方格取数
1043 方格取数 2000年NOIP全国联赛提高组 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 钻石 Diamond 题解 查看运行结果 题目描述 Descri ...
- UIWebView 使用
UIWebView是iOS sdk中一个最常用的控件.是内置的浏览器控件,我们可以用它来浏览网页.打开文档等等.这篇文章我将使用这个控件,做一个简易的浏览器.如下图: 我们创建一个Window-bas ...
- react native 安卓打包--mac环境,如果打包不成功可注意下my-release-key.keystore的位置关系(绝对路径)
// my-release-key.keystore和my-key-alias都是可修改的名称 1.生成签名密钥(keytool -genkey -v -keystore my-release-key ...
- bzoj3196:Tyvj1730二逼平衡树
传送门 暴力啊,直接树套树上啊 线段树套splay,卡卡常就直接A了 代码: #include<cstdio> #include<iostream> #include<a ...
- Windows下MySQL8.0.13解压版安装教程
下载 MySQL8.0.13-64位下载地址 在下载页面的底部,有三种安装包,第一种是MySQL的安装程序,下载完点击安装即可. 第二种是普通的压缩版,体积较小. 第三种是自带debug和测试的压缩版 ...