I have a directory structure:
include/foo/bar/header1.h
include/foo/bar/header2.h
header1.h
includes header2.h
. However, when I attempt this:
import cppyy
cppyy.add_include_path('include')
cppyy.include('foo/bar/header1.h')
I get the error:
ImportError: Failed to load header file "foo/bar/header1.h"
In file included from input_line_33:1:
./include/foo/bar/header1.h:11:10: fatal error: 'foo/bar/header2.h' file not found
#include "foo/bar/header2.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am not sure what to do here. I could include header2.h
manually, but it in turn has other include files and I would probably end up including the entire project manually, which seems like it doesn't need to happen. I have tried both cppyy.include('include/foo/bar/header1.h')
and cppyy.include('foo/bar/header1.h')
. I have also tried cppyy.add_include_path('include')
and cppyy.add_include_path('include/foo')
. Neither of those helped.