Skip to content

C++ project properties problems #4

Open

Description

@jimgunn3

I have downloaded Python and C++ code and created VS Solution/Project as per MSFT web page instructions and Github code and instructions. The Python works perfectly. But, when I try to set the C++ properties, the "General>Target Extension: .pyd" property is not available. When build is attempted, an error message 'unresolved import supercodefast' " occurs. I checked my installation with the installer several times and have checked "Python native Development Tools" options. But when I revisit the installer, it is unchecked and appears to not have been installed. I am using VS Community 2019 with 32-bit Python and C++. This problems is probably some misunderstanding on my part, but could be a bug? Guidance to find and fix issues will be greatly appreciated. I have many needs for Python C++ extensions. Thank you.

Activity

  1. jimgunn3 commented on Aug 8, 2019

    @jimgunn3
    Author

    I still can't get MSFT's Visual Studio 2019 (v16.2.0) Python (V3.74) MSVC C++ Extension walk-through (references below) to work. I have many uses for Python C++ Extensions and need to learn how to do this. I am requesting help to directly compile using the C++ compiler and/or Python distutils module (setup.py). Hopefully this will provide guidance and knowledge to VS working. Thank you.

    URLs to this walk-through are: 1) https://github.com/MicrosoftDocs/visualstudio-docs/blob/master/docs/python/working-with-c-cpp-python-in-visual-studio.md, and 2) https://github.com/microsoft/python-sample-vs-cpp-extension. I am using the Python and C++ compiler installed via VS. I used the code as is from GitHub URL 2) above: 1) CPPandPython, 2) superfastcode, and 3) superfastcode2 The Python Code (with C++ calls commented out) works exactly as expected. I been able to get the CPython superfastcode to work manually using setup.py, but not in VS. I am unable to get the pybind11 code to work either manually or in VS. I think I followed the steps in the walk-through carefully, but limited success so far. This is a mixed mode VS Solution with 3 projects. This walk-through requires significant VS configurations for Python project paths, extensions, etc.; and C++ project(s) property configurations as per the above URLs. I think my problems must be mis-understanding(s) of the mixed mode configurations, but what???? Guidance will be appreciated.

  2. jimgunn3 commented on Aug 9, 2019

    @jimgunn3
    Author

    I was not aware this issue was closed. Sorry.

  3. Anapo14 commented on Aug 19, 2019

    @Anapo14

    Maybe Steve Dower (@zooba) could potentially provide some guidance on the best practice here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions