Closed MohammadSahandi closed 6 months ago
It seem using this two lines of code in CMakeLists.txt of render and python directories can solve this problem:
link_directories(../include/) include_directories(../include/)
the include directory is for virtual env.
Hello everyone
I have complete all steps before compiling. But when I run
cmake ..
I get the output :`-- Found DART: /usr/include found components: collision-bullet dart -- Found DART: /usr/include found components: gui collision-bullet dart -- Found DART: /usr/include found components: collision-bullet dart -- Configuring done CMake Warning (dev) at render/CMakeLists.txt:20 (add_executable): Policy CMP0028 is not set: Double colon in target name means ALIAS or IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
Target "render" links to target "pybind11::embed" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? This warning is for project developers. Use -Wno-dev to suppress it.
-- Generating done
After that I run
make -j8
and this is the error I get:In file included from /home/mohammad/MASS/python/EnvManager.cpp:1:0: /home/mohammad/MASS/python/EnvManager.h:4:10: fatal error: pybind11/embed.h: No such file or directory
include <pybind11/embed.h>
compilation terminated. python/CMakeFiles/pymss.dir/build.make:62: recipe for target 'python/CMakeFiles/pymss.dir/EnvManager.cpp.o' failed make[2]: [python/CMakeFiles/pymss.dir/EnvManager.cpp.o] Error 1 CMakeFiles/Makefile2:195: recipe for target 'python/CMakeFiles/pymss.dir/all' failed make[1]: [python/CMakeFiles/pymss.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... In file included from /home/mohammad/MASS/render/Window.cpp:1:0: /home/mohammad/MASS/render/Window.h:9:10: fatal error: pybind11/embed.h: No such file or directory
include <pybind11/embed.h>
compilation terminated. In file included from /home/mohammad/MASS/render/main.cpp:1:0: /home/mohammad/MASS/render/Window.h:9:10: fatal error: pybind11/embed.h: No such file or directory
include <pybind11/embed.h>
compilation terminated. render/CMakeFiles/render.dir/build.make:62: recipe for target 'render/CMakeFiles/render.dir/Window.cpp.o' failed make[2]: [render/CMakeFiles/render.dir/Window.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... render/CMakeFiles/render.dir/build.make:86: recipe for target 'render/CMakeFiles/render.dir/main.cpp.o' failed make[2]: [render/CMakeFiles/render.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:140: recipe for target 'render/CMakeFiles/render.dir/all' failed make[1]: [render/CMakeFiles/render.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2
I have installed "pybind11[global]" in virtual env but did not help.
Any solution?