Temporary header file '/tmp/snxBDCBL26/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 #define getaddrinfo_a(a,b,c,d) // add includes #include "/usr/include/lua5.1/lua-curl.h" #include "/usr/include/lua5.2/lua-curl.h" The GCC parameters: gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w "/tmp/snxBDCBL26/dump1.h" In file included from /tmp/snxBDCBL26/dump1.h:12: /usr/include/lua5.1/lua-curl.h:4:36: error: ‘lua_State’ was not declared in this scope 4 | int luacurl_freepops_open_and_init(lua_State* L); | ^~~~~~~~~ /usr/include/lua5.1/lua-curl.h:4:47: error: ‘L’ was not declared in this scope 4 | int luacurl_freepops_open_and_init(lua_State* L); | ^ /usr/include/lua5.1/lua-curl.h:5:27: error: ‘lua_State’ was not declared in this scope 5 | int luacurl_freepops_open(lua_State* L); | ^~~~~~~~~ /usr/include/lua5.1/lua-curl.h:5:38: error: ‘L’ was not declared in this scope 5 | int luacurl_freepops_open(lua_State* L); | ^ /usr/include/lua5.1/lua-curl.h:8:18: error: ‘lua_State’ was not declared in this scope 8 | int luaopen_curl(lua_State* L); | ^~~~~~~~~ /usr/include/lua5.1/lua-curl.h:8:29: error: ‘L’ was not declared in this scope 8 | int luaopen_curl(lua_State* L); | ^