Closed metab0t closed 2 years ago
This is https://github.com/wlav/CPyCppyy/issues/3 . There, however, it was an older VS (2017). It actually worked for the version I used (2019), so I assumed that it would have been fine with more modern VS in general, but I guess not.
I just put out cppyy 2.3.1 patch release with contains just this fix over 2.3.0.
Now cppyy can be installed but still cannot be imported.
The logs are as follows:
Looks like Cling can't find the C++ standard headers. Did you run python within an MSVC environment? This is needed to build the PCH. Second time around, with the PCH available, it can be run without. Aside, I would have expected a PCH to have been build during installation time, so a bit surprised it builds again on first import (it compares the time stamp of the cppyy_backend\include
directory to that of the PCH).
Access to the standard headers is something on Windows that is not an issue on Linux/Mac: if the sources can be build, standard headers are available in easy to find locations. It's on my wish list to improve but upstream (and Clang/LLVM for that matter) always put Windows support last (if at all), so it's a lot of work.
Thank you for your explanation! I run Python now in MSVC x64 shell and cppyy is imported without issues, but it seems that it always fails when it is not run in MSVC x64 shell. Does it mean that PCH is not built successfully?
BTW, maybe we should add some reminders in documentation for users on Windows to run Python within an MSVC environment?
Yes, but I'll first try VS 2022, see what is different (I've been using 2019 so far, and last time I checked using the PCH worked w/o further access to standard header files).
This was fixed with patch release 2.3.1 and its dependencies.
I try to install cppyy on Windows 10 and the following error happened. I have installed Visual Studio 2022 on my machine.
Is there any clue to solve this issue?