【发布时间】:2014-08-13 11:22:14
【问题描述】:
我正在构建一个支持子弹物理的 Windows OpenGL 应用程序。 我的开发环境设置是:
- 操作系统:Windows 7 SP1 64 位
- IDE ; Visual Studio 2010 SP1
- BulletPhysics - bullet-2.82-r2704
我的应用程序有两种配置,即 Win32 和 x64。 这是我构建 Windows 应用程序的步骤:
- 首先我在 "bullet-2.82-r2704\build" 中执行 vs2010.bat 文件。
- 我将第 1 步创建的 vs2010 文件夹中的项目文件添加到我的 Visual Studio 解决方案中。
- 为 BulletDynamics、BulletCollision 和 LinearMath 添加项目依赖项
- 为所有项目符号库添加参考。
现在,当我为这两种配置构建解决方案时(即为 Win32 和 x64 进行批量构建),一切都可以正常构建,除了:
x64 版本 - 出现如下错误:
BulletCollision_vs2010_x64_debug.lib(btDefaultCollisionConfiguration.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '2' doesn't match value '0' in stdafx.obj
Win32 发布 - 出现如下错误:
Win32_Window.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall btConvexInternalShape ...
Win32 调试 - 出现如下错误:
Win32_Window.obj : error LNK2019: unresolved external symbol "public: __thiscall btRigidBody
最终消息 - 构建:13 次成功,3 次失败
我正在按照这个帮助来构建我的 Visual Studio 项目:
注意:如果我使用 CMAKE 为 BulletPhysics 构建 VisualStudio 解决方案,然后将它们分别链接到我的每个 CPU 架构的 Windows 应用程序,那么它会正确构建(即为 Win32 和 x64 分开)。
有没有什么方法可以让我只使用一个 Visual Studio 解决方案?
【问题讨论】:
标签: c++ windows visual-studio visual-c++ bulletphysics