Temporary header file '/tmp/P1lk6zNEf6/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/opencv4/opencv2/imgcodecs/imgcodecs_c.h" #include "/usr/include/opencv4/opencv2/imgcodecs/ios.h" #include "/usr/include/opencv4/opencv2/imgcodecs/legacy/constants_c.h" #include "/usr/include/opencv4/opencv2/imgcodecs/macosx.h" #include "/usr/include/opencv4/opencv2/imgcodecs.hpp" The GCC parameters: gcc -fdump-lang-raw -fkeep-inline-functions -c -x c++ -fpermissive -w "/tmp/P1lk6zNEf6/dump1.h" -I/usr/include/opencv4 -I/usr/include/arm-linux-gnueabihf/opencv4/opencv2 In file included from /tmp/P1lk6zNEf6/dump1.h:12: /usr/include/opencv4/opencv2/imgcodecs/imgcodecs_c.h:1:2: error: #error "This header with legacy C API declarations has been removed from OpenCV. Legacy constants are available from legacy/constants_c.h file." 1 | #error "This header with legacy C API declarations has been removed from OpenCV. Legacy constants are available from legacy/constants_c.h file." | ^~~~~ In file included from /tmp/P1lk6zNEf6/dump1.h:13: /usr/include/opencv4/opencv2/imgcodecs/ios.h:44:9: fatal error: UIKit/UIKit.h: No such file or directory 44 | #import | ^~~~~~~~~~~~~~~ compilation terminated.