microsoft / microsoft/PTVS

Unable to create DLL for C++

Open
#7,330 1 comment 0 reactions 1 assignee View on GitHub

@AdamYoblick is already working on this.

Since Dec 12, 2023.

needs repro
Dominant language
C#
Stars
2.6k
Forks
680
Avg merge
39m
Merged PRs (30d)
1

Description

Hi,
I'm trying to call C++ program in a pytorch project which to speed up the convolution operations.
I followed the instruction https://learn.microsoft.com/en-us/visualstudio/python/working-with-c-cpp-python-in-visual-studio?view=vs-2019 step by step.
I also updated the pip and setup tools to pip(22.3.1) and setuptools(65.7.0), I copy the full path and deleted the pyproject.toml at the end.
However, at the end of Make the DLL available to Python, when I trying to "In the search box, paste the copied path, delete pyproject.toml from the end, and then select Enter to install the module from that directory." it failed, the output is shown below.
image
I noticed that the fatal error C1083 cannot open include file torch/torch.h no such file or directory.
However, it can successfully build as shown below.
image

Can anyone help with this issue?
Update 1/15/2023
I tried to fix the setup.py and pyproject.toml as shown below, but still not working.
image
image


[Enter feedback here]


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.