Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't build on Windows + MSVC #36

Closed
quartzsaber opened this issue Apr 29, 2022 · 4 comments
Closed

Doesn't build on Windows + MSVC #36

quartzsaber opened this issue Apr 29, 2022 · 4 comments

Comments

@quartzsaber
Copy link

Installing cysimdjson using pip on Windows with MSVC fails.

It is due to MSVC not understanding the compiler flag -Wno-deprecated when compiling cysimdjson.cpp.

Also, MSVC won't understand -std=c++17 and will ignore the flag (and use C++11). The syntax for MSVC is /std:c++17.

Here is the relevent error log:

  building 'cysimdjson.cysimdjson' extension
  creating build\temp.win-amd64-cpython-37
  creating build\temp.win-amd64-cpython-37\Release
  creating build\temp.win-amd64-cpython-37\Release\cysimdjson
  creating build\temp.win-amd64-cpython-37\Release\cysimdjson\pysimdjson
  creating build\temp.win-amd64-cpython-37\Release\cysimdjson\simdjson
  "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Icysimdjson "-IC:\Program Files\Python37\include" "-IC:\Program Files\Python37\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwinrt" /EHsc /Tpcysimdjson/cysimdjson.cpp /Fobuild\temp.win-amd64-cpython-37\Release\cysimdjson/cysimdjson.obj -std=c++17 -Wno-deprecated
  cl : command line error D8021 : Invalid numeric argument '/Wno-deprecated'
  error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for cysimdjson
@mansi-agrawal
Copy link

I am facing the same issue, Is this repo active?

@vovavili
Copy link

vovavili commented Oct 5, 2022

I can confirm that this issue still exists as of October.

@Vizonex
Copy link
Contributor

Vizonex commented Mar 24, 2023

#40 I came up with a possible solution for windows users that I think may help solve this problem. turns out the flag for windows is called /std:c++17 This flag allows for windows to compile the code correctly

@zfb132
Copy link

zfb132 commented May 2, 2023

Thank you. It works! @Vizonex

@ateska ateska closed this as completed Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants