2

I'd like to run T-spline from Github, but this error occurs every time

Error   C1083
Cannot open include file: 'pybind11/pybind11.h': No such file or directory

I'm trying to build the project.

  • I put code and everything else in C:\Program Files (x86).
  • I use pybind/pybind11.
  • I use laumaya/GLC_lib.
  • I use Github extension in MSVC and I download everything directly through the extension.
  • I run CMake (3.13.1) for T-spline and everything looks fine.
  • I use MSVC 15 2017.

Thank you!

4
  • 1
    That's not enough information to help you. Where is that file located on your machine? Commented Dec 16, 2018 at 16:31
  • I tried some different locations , but this last one is C:\Program Files (x86). So the source file and everything else is located there. I thought i had to bring it all together in the same File. Commented Dec 16, 2018 at 21:30
  • I thought that i followed the instructrions . Take a look:- Run CMake; - Specify the source code and binary directories (fill the corresponding entries with value "../SOURCE_DIRECTORY" or drag the "CMakeLists.txt" file); - Press Configure button, set up the Generator settings(choose the Microsoft Visual C++ (MSVC) version); ...... - Press Generate button(it will generate all the binary files in the SOURCE_DIRECTORY); - Open tspline.sln file in MSVC and build the solution; Commented Dec 16, 2018 at 21:31
  • As soon as i get to the last one" Open tspline.sln..." everything seems to be fine !? But when i 'm trying to buid it on MSVC , then i always take the same error!!! Commented Dec 16, 2018 at 21:35

1 Answer 1

1

If you are using pybind11, then you shouldn't do it this way.

First make pybind11 a submodule in your git repo, or just check it out in your source tree and call:

add_subdirectory(${CMAKE_SOURCE_DIR}/3rdParty/pybind11)

Then you can create a pybind module:

 pybind11_add_module(${NAME} MODULE ${SRC} ${HEADERS})

This way, if something is missing, you will see it when CMake starts, and not during building.

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

2 Comments

Do you mean something like this?add_subdirectory(${TSPLINE}/3rdParty/pybind11) pybind11_add_module(${TSLPINE} MODULE ${TSPLINE} ${TSPLINE})
Almost. the first argument to add_module is the name you want and then you have the list of the files you want to compile. I don't think ${TSPLINE} is an a name, a folder and a list of files. But you are almost there. See also the documentation for another example of usage (the link in my answer).

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.