-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Make sure you've completed the following steps before submitting your issue -- thank you!
You can remove this template text afterward.
- Check if your question has already been answered in the FAQ section.
- Make sure you've read the documentation. Your issue may be addressed there.
- If those resources didn't help and you only have a short question (not a bug report), consider asking in the Gitter chat room.
- If you have a genuine bug report or a more complex question which is not answered in the previous items (or not suitable for chat), please fill in the details below.
- Include a self-contained and minimal piece of code that reproduces the problem. If that's not possible, try to make the description as clear as possible.
Issue description
(Provide a short description, state the expected behavior and what actually happens.)
Build FAILED.
Reproducible example code
(The code should be minimal, have no external dependencies, isolate the function(s) that cause breakage. Submit matched and complete C++ and Python snippets that can be easily compiled and run to diagnose the issue.)
I am following the Document: First steps->Compiling the test cases->Windows. Since my Python is 64 bit, Windows is 64 bit and VS2015 is 64 bit, I'm targeting 64 bit (who isn't using 64 bit nowadays?) and used "cmake -A x64 .." after "cd build". Errors occurred when I ran "cmake --build . --config Release --target check" as follows:
Done Building Project "C:\Users\hzhou3\Downloads\pybind11\build\tests\check.vcx
proj" (default targets) -- FAILED.Build FAILED.
"C:\Users\hzhou3\Downloads\pybind11\build\tests\check.vcxproj" (default target)
(1) ->
"C:\Users\hzhou3\Downloads\pybind11\build\tests\pytest.vcxproj" (default target
) (3) ->
"C:\Users\hzhou3\Downloads\pybind11\build\tests\pybind11_tests.vcxproj" (defaul
t target) (4) ->
(ClCompile target) ->
C:\Users\hzhou3\Downloads\pybind11\tests\test_python_types.cpp : warning C481
9: The file contains a character that cannot be represented in the current code
page (936). Save the file in Unicode format to prevent data loss [C:\Users\hzh
ou3\Downloads\pybind11\build\tests\pybind11_tests.vcxproj]"C:\Users\hzhou3\Downloads\pybind11\build\tests\check.vcxproj" (default target)
(1) ->
"C:\Users\hzhou3\Downloads\pybind11\build\tests\pytest.vcxproj" (default target
) (3) ->
"C:\Users\hzhou3\Downloads\pybind11\build\tests\pybind11_tests.vcxproj" (defaul
t target) (4) ->
(ClCompile target) ->
C:\Users\hzhou3\Downloads\pybind11\tests\test_python_types.cpp(471): error C2
181: illegal else without matching if [C:\Users\hzhou3\Downloads\pybind11\build
\tests\pybind11_tests.vcxproj]
C:\Users\hzhou3\Downloads\pybind11\tests\test_python_types.cpp(476): error C2
065: 'cake32': undeclared identifier [C:\Users\hzhou3\Downloads\pybind11\build
tests\pybind11_tests.vcxproj]1 Warning(s) 2 Error(s)
I have checked that the Python binary and the testcases are compiled for the same x64 platform. So, how to fix this issue?
My environment:
- Windows 7 Enterprise SP1 64 bit, I am the Administrator and run cmd as Administrator.
- Python 2.7.13 64 bit
- Visual Studio 2015 (v14.0) Update 3
- the pybind11 downloaded is the newest version