'QT Creator and OpenCV455: 'arm_neon.h' file not found

I'm building a project using qt6 and opencv455. I'm doing this on the new MacBook with a silicon chip (arm64). I can compile the whole project without errors, but I always get the 'arm_neon.h' file not found error message in the editor and therefore the syntax highlighting and warning display doesn't work correctly for the rest of the code. I've added some more details below - any help appreciated.

Stack:

Qt Creator 7.0.1 Based on Qt 6.2.3 (Clang 13.0 (Apple), 64 bit) Self compiled OpenCv 455 version according to official docs

Error:

X.h: In included file: 'arm_neon.h' file not found cv_cpu_dispatch.h:219:12: error occurred here

What I've tried:

Re-installing everything, recompiling opencv, reinstalling the command line tools, updating the command line tools, double checked every link.



Solution 1:[1]

Okay, I found a solution after three days of re-installing and re-compiling everything in every possible configuration (like opencv with unix makefiles, xcode, forced target architecture of arm64 etc). What finally worked was to disable the ClangCodeModel flag in the plugin section of QtCreator (Menu: About/Plugins/ -> search for ClangCodeModel, disable the plugin and restart the application.

I'm pretty sure this is just a workaround, but at least I can work now as it should be and maybe this helps someone else. If anyone has some input on how to fix this issue at its core, any help or alternative answer is very appreciated.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 schlenger