Kautenja/nes-py

Fails to Compile on Windows 10 (Visual Studio 2017)

Closed this issue · 4 comments

caikn commented

Describe the bug

pip install nes-py failed due to compiling error below:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ines_py/nes/include -IC:\ProgramData\Anaconda3\envs\tfgpu_env\include -IC:\ProgramData\Anaconda3\envs\tfgpu_env\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpnes_py/nes/src\cpu.cpp /Fobuild\temp.win-amd64-3.6\Release\nes_py/nes/src\cpu.obj -std=c++1y -march=native -pipe -O2
cl : Command line warning D9002 : ignoring unknown option '-std=c++1y'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
cl : Command line warning D9002 : ignoring unknown option '-pipe'
cpu.cpp
nes_py/nes/src\cpu.cpp(154): error C2196: case value '3' already used

To Reproduce

Steps to reproduce the behavior:

run pip install nes-py under windows 10

Expected behavior

successful installation for windows 10

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Windows 10
  • Python version: 3.6.8
  • C++ compiler and version: Visual Studio 2017

Additional context

Add any other context about the problem here.

I've seen this error on Windows, but was unable to resolve it. The line it references doesn't exhibit the error displayed and commenting out the switch statement that has line 154 fails to resolve the issue and the line number in the compiler error doesn't change. Further, the entire document appears free of any duplicate cases upon close review and compiles with gcc, clang++, etc. Feel free to clone and mess with the code. I don't use Windows so this is not a priority for me.

Having Same issue

Same issue

please limit the thread to productive / constructive comments as the issue is already confirmed and easilly reproducable. PRs are welcome.