解决 Cocos2d-x 3.2 error C1041: 无法打开程序数据库vc120.pdb
Cocos2d-x 3.2最高支持的VS版本为2012,我在VS2013上编译新建立的项目遇到错误:
错误 1 error C1041: 无法打开程序数据库“x:\cocos2d-x-3.2\projects\hellococo\cocos2d\external\chipmunk\proj.win32\debug.win32\vc120.pdb”;如果要将多个 CL.EXE 写入同一个 .PDB 文件,请使用 /FS
单个项目解决方案
解决方案是为项目添加 /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相关推荐
- fatal error C1033: 无法打开程序数据库
转自VC错误:http://www.vcerror.com/?p=1894 问题描述: fatal error C1033: 无法打开程序数据库"" 因为vs2003在window ...
- VS2010中:error C2471: 无法更新程序数据库
Visual Studio 2010环境下 error C2471: 无法更新程序数据库"--.pdb" fatal error C1083: 无法打开程序数据库文件:" ...
- 成功解决 _mssql.c(568): fatal error C1083: 无法打开包括文件: “sqlfront.h”: No such file or directory
成功解决 _mssql.c(568): fatal error C1083: 无法打开包括文件: "sqlfront.h": No such file or directory 目 ...
- 解决:mysql报错ERROR 1049 (42000): Unknown database ‘数据库‘
其实我是犯了一个很严重的错误,报这个错无非就两个原因. 原因一:你的账户密码后面多了一个空格,也就是说你的数据库不对. 解决办法:如果是登录密码的时候就报这个错误,如下图所示: 那么就有可能p和123 ...
- 解决idea编译提示: Error:(4, 28) java: 程序包com.xxx.xxx不存在 问题
问题:idea中通过maven已经导入了包,idea中也能定位到包的位置,但在编译的时候始终报error,找不到包. 原因:idea的版本与maven构建的build不兼容 解决方案: 卸载idea, ...
- 成功解决问题LINK : fatal error LNK1181: 无法打开输入文件“m.lib”error: command ‘D:\\Program Files\\Microsoft Visu
成功解决问题LINK : fatal error LNK1181: 无法打开输入文件"m.lib" error: command 'D:\\Program Files\\Micro ...
- 成功解决sub_div.insert(points)cv2.error: OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\imgproc
成功解决sub_div.insert(points) cv2.error: OpenCV(3.4.1) C:\projects\opencv-python\opencv\modules\imgproc ...
- 成功解决building ‘snappy._snappy‘ extension error: Microsoft Visual C++ 14.0 is required. Get it with “B
成功解决building 'snappy._snappy' extension error: Microsoft Visual C++ 14.0 is required. Get it with &q ...
- 成功解决.sh: line 6: syntax error near unexpected token `do
成功解决.sh: line 6: syntax error near unexpected token `do 目录 解决问题 解决思路 解决方法 T1.修改格式系统间不兼容的格式
最新文章
- python 字符串形式的列表 转 列表
- 4位先行进位加法器_行波进位/超前进位加法器详解
- P2153 晨跑,费用流裸题
- 常用的Homebrew的命令的使用
- 【Python基础入门系列】第10天:Python 类与对象
- Servlet第三篇【request和response简介、response的常见应用】
- 如何使用Restic Backup Client将数据备份到对象存储服务
- fmea手册_黄老师与您共读新版FMEA手册07-DFMEA功能分析
- 事务四大特性及隔离级别
- js 读取外部的本地json文件
- php7.1.1一键安装/配置文件简单优化
- Android WIFI连接开发 WIFI工具类
- 批量给 Word、PPT 和 PDF 插入封面或新的页面
- python续行符是啥_python 续行符
- C语言 有两个矩形 求重叠面积,计算两个矩形重叠面积的简单方法
- Python中__str__的用法
- 范数理解(0范数,1范数,2范数)
- win10系统无法连接远程服务器,笔者修复win10系统无法连接远程服务器的图文教程...
- 计算机组成原理实验一:全加器实验
- 【蛮力算法】数据结构与算法
热门文章
- vue 自适应屏幕的宽高度
- 20221220今天的世界发生了什么
- python中print无法打印在控制台输出_Pycharm Python控制台不打印输出
- 好多人,微软编程马拉松大赛欲创吉尼斯世界纪录
- 第八课--H5内联 SVG
- 滴滴发布“五一”劳动节假期安全出行保障公告:应急处置人员24小时轮岗值班...
- JavaScript之ES6语法
- 《人工智能基础》——线性回归算法推导
- 命令模式---电视机遥控器
- java年轻代minor gc_jvm之年轻代(新生代)、老年代、永久代以及GC原理详解、GC优化...