0

I'm trying to make a pip package from c++ project with pybind11 python bindings. However, every time I try to build the wheel, I get include errors, no matter what I try.

Things I've tried: Project structure:

src/
   header1.hpp
   header2.hpp
   mainheader.hpp
   mainfile.cpp
   pythonbindings.cpp

in mainheader: #include "header1.hpp" or #include "src/header1.hpp" or #include "./header1.hpp"

Other project structure I've tried (generated by cookiecutter cpp project):

include/
   header1.hpp
   header2.hpp
   mainheader.hpp
python/
   pythonbindings.cpp
src/
   mainfile.cpp

I have a setup.py and a pyproject.toml. I try to run python3 -m build, but EVERY SINGLE TIME I get an include error for either mainheader.hpp (top project structure) or header1.hpp (bottom project structure). If you need to see my cmake/setup/pyproject files, please let me know and I'll add them.

1
  • add the actual error you're getting to your question Commented Sep 19, 2023 at 17:05

1 Answer 1

0

Please provide your CMakeLists.txt

Otherwise take a look at this template project: https://github.com/mizux/cmake-pybind11

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.