How to I setup Box2D for Microsoft Visual C++ 2010 Express? I don't see any .lib files or an include directory, nor do I see MSVC++ Compatible Projects and Solutions. Any help would be greatly appreciated.
Using Box2D with Microsoft Visual C++ 2010 Express
Build IssuesPlease reading Building.txt.
I am trying to CMake the Box2D, as written in Building.txt, with Windows 7 64-bit, Visual Studio 10 express edition, and this is what happens:
What to do now? Is box2d already supporting this platform?
Code:
Check for working C compiler using: Visual Studio 10 Win64
Check for working C compiler using: Visual Studio 10 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/install_files/coding_stuff/Box2D_v2.1.2/Box2D/Build/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
cmTryCompileExec.vcxproj /p:Configuration=Debug
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 27.9.2010 23:21:37.
Project
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
on node 1 (default targets).
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7):
error MSB8007: The Platform for project 'cmTryCompileExec.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you are
trying to build a project without a solution file, and have specified a
non-default Platform that doesn't exist for this project.
[D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
Done Building Project
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
(default targets) -- FAILED.
Build FAILED.
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
(default target) (1) ->
(InvalidPlatformError target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for project 'cmTryCompileExec.vcxproj' is invalid. Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project. [D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.03
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
Configuring incomplete, errors occurred!
Check for working C compiler using: Visual Studio 10 Win64 -- broken
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/install_files/coding_stuff/Box2D_v2.1.2/Box2D/Build/CMakeFiles/CMakeTmp
Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
cmTryCompileExec.vcxproj /p:Configuration=Debug
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.1]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 27.9.2010 23:21:37.
Project
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
on node 1 (default targets).
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7):
error MSB8007: The Platform for project 'cmTryCompileExec.vcxproj' is
invalid. Platform='x64'. You may be seeing this message because you are
trying to build a project without a solution file, and have specified a
non-default Platform that doesn't exist for this project.
[D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
Done Building Project
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
(default targets) -- FAILED.
Build FAILED.
"D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
(default target) (1) ->
(InvalidPlatformError target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.Cpp.InvalidPlatform.Targets(23,7): error MSB8007: The Platform for project 'cmTryCompileExec.vcxproj' is invalid. Platform='x64'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Platform that doesn't exist for this project. [D:\install_files\coding_stuff\Box2D_v2.1.2\Box2D\Build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.03
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
Configuring incomplete, errors occurred!
What to do now? Is box2d already supporting this platform?
That looks like a cmake problem, not a Box2D problem. Try checking cmake.org.
You could try building 32-bit. Does VS Express support 64-bit?
You could try building 32-bit. Does VS Express support 64-bit?
cmake-gui's configure button did not allow me to, but I typed into cmd-prompt
cmake -G "Visual Studio 10"
And that made it as 32-bit. Now yet made any box2d-application but that's an other story. Thank you
cmake -G "Visual Studio 10"
And that made it as 32-bit. Now yet made any box2d-application but that's an other story. Thank you
Also, I have not tested Win64 at all.
Original thread: https://box2d.org/forum/viewtopic.php?t=5130