Temporary header file '/tmp/tqrzHRA1gI/dump1.h' with the following content will be compiled to create GCC translation unit dump: // add defines #define __STDC_VERSION__ 201710L #define _GXX_NULLPTR_T #define CLUTTER_ENABLE_COMPOSITOR_API 1 #define _REGEX_NELTS(n) #define _Atomic #define PACKED // add includes #include "/usr/include/samba-4.0/pyldb.h" // add classes _G_fpos64_t* tmp_add_class_0; _G_fpos_t* tmp_add_class_1; _IO_cookie_io_functions_t* tmp_add_class_2; The GCC parameters: gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w "/tmp/tqrzHRA1gI/dump1.h" In file included from /tmp/tqrzHRA1gI/dump1.h:11: /usr/include/samba-4.0/pyldb.h:32:9: error: ‘PyObject_HEAD’ does not name a type 32 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:46:9: error: ‘PyObject_HEAD’ does not name a type 46 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:51:1: error: ‘PyObject’ does not name a type; did you mean ‘PyLdbObject’? 51 | PyObject *pyldb_Dn_FromDn(struct ldb_dn *); | ^~~~~~~~ | PyLdbObject /usr/include/samba-4.0/pyldb.h:52:45: error: ‘PyObject’ has not been declared 52 | bool pyldb_Object_AsDn(TALLOC_CTX *mem_ctx, PyObject *object, struct ldb_context *ldb_ctx, struct ldb_dn **dn); | ^~~~~~~~ /usr/include/samba-4.0/pyldb.h:55:23: error: ‘PyObject’ was not declared in this scope; did you mean ‘PyLdbObject’? 55 | bool pyldb_check_type(PyObject *obj, const char *type_name); | ^~~~~~~~ | PyLdbObject /usr/include/samba-4.0/pyldb.h:55:33: error: ‘obj’ was not declared in this scope 55 | bool pyldb_check_type(PyObject *obj, const char *type_name); | ^~~ /usr/include/samba-4.0/pyldb.h:55:38: error: expected primary-expression before ‘const’ 55 | bool pyldb_check_type(PyObject *obj, const char *type_name); | ^~~~~ /usr/include/samba-4.0/pyldb.h:58:9: error: ‘PyObject_HEAD’ does not name a type 58 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:65:9: error: ‘PyObject_HEAD’ does not name a type 65 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:78:9: error: ‘PyObject_HEAD’ does not name a type 78 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:86:9: error: ‘PyObject_HEAD’ does not name a type 86 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:93:9: error: ‘PyObject_HEAD’ does not name a type 93 | PyObject_HEAD | ^~~~~~~~~~~~~ /usr/include/samba-4.0/pyldb.h:95:9: error: ‘PyObject’ does not name a type; did you mean ‘PyLdbObject’? 95 | PyObject *msgs; | ^~~~~~~~ | PyLdbObject /usr/include/samba-4.0/pyldb.h:96:9: error: ‘PyObject’ does not name a type; did you mean ‘PyLdbObject’? 96 | PyObject *referals; | ^~~~~~~~ | PyLdbObject /usr/include/samba-4.0/pyldb.h:97:9: error: ‘PyObject’ does not name a type; did you mean ‘PyLdbObject’? 97 | PyObject *controls; | ^~~~~~~~ | PyLdbObject /usr/include/samba-4.0/pyldb.h:101:9: error: ‘PyObject_HEAD’ does not name a type 101 | PyObject_HEAD | ^~~~~~~~~~~~~