I am using pybind11 setuptools to build a python module(.pyd),but an error occurred when it comes to
executing :error: command 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe' failed with exit code 2
setup.py:
import osfrom setuptools import setup,find_packagesfrom pybind11.setup_helpers import Pybind11Extension, build_ext
cpp_source_dir = os.path.join(os.path.dirname(os.path.abspath(file)),"cpp_source")serial_handler_path = os.path.join(cpp_source_dir, "serial_handler.cpp")ext_modules = [Pybind11Extension(name="serial_handler",sources=[serial_handler_path],)]
setup(cmdclass={"build_ext": build_ext}, ext_modules=ext_modules,packages=find_packages())
but it worked successfully on visual studio IDE when i use IDE button to build the .pyd file .
vs configures:enter image description here[enter image description here](https://i.sstatic.net/lGCCVOC9.jpg)
i want to generate .pyd module by python pybind11 setuptools.