你可以使用一些特殊的pragma命令来指定include目录¹。例如,你可以在Jupyter Notebook的代码单元中写:
#pragma cling add_include_path(“inc_directory”)
这样就可以让xeus-cling知道你要包含的头文件在哪里¹。
参考:
2023/3/2(1) Build options — xeus-cling documentation - Read the Docs. https://xeus-cling.readthedocs.io/en/latest/build_options.html 访问时间 2023/3/2.
(2) Build options — xeus-cling documentation - Read the Docs. https://xeus-cling.readthedocs.io/en/latest/build_options.html 访问时间 2023/3/2.
(3) 构建选项 — xeus-cling 文档. https://daobook.github.io/xeus-cling/build_options.html 访问时间 2023/3/2.
(4) JohanMabille,LoicGouarinandSylvainCorlay - Read the Docs. https://xeus-cling.readthedocs.io/_/downloads/en/stable/pdf/ 访问时间 2023/3/2.
(5) GitHub - jupyter-xeus/xeus-cling: Jupyter kernel for the C++ … https://github.com/jupyter-xeus/xeus-cling 访问时间 2023/3/2.
(6) Include directories with transitive dependencies #1 - github.com. https://github.com/dokempf/xeus-cling-cmake-setup/issues/1 访问时间 2023/3/2.