cartr/homebrew-qt4

"unrecognized #pragma" with Q_OBJECT on ICC

swordencao opened this issue · 2 comments

After 4.8.7_4 was updated, Q_OBJECTs weren't been recognized and lots of errors were thrown by compiler like this.

/usr/local/Cellar/qt@4/4.8.7_4/lib/QtOpenGL.framework/Versions/4/Headers/qgl.h(476): warning #161: unrecognized #pragma
      Q_OBJECT
      ^

I use macOS High Sierra Version 10.13.5 and ICC 18.0.2 20180210.

cartr commented

Thanks for the report!

It seems kind of strange that you're getting this error, since the patch we added in 4.8.7_4 explicitly checks for ICC and disables the new #pragmas. Are you compiling your code with the -no-icc option?

Issue fixed by #58