cartr / homebrew-qt4

Homebrew tap for Qt4 and dependent formulae on Sierra
BSD 2-Clause "Simplified" License
105 stars 42 forks source link

"unrecognized #pragma" with Q_OBJECT on ICC #57

Closed swordencao closed 6 years ago

swordencao commented 6 years ago

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 6 years ago

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?

swordencao commented 6 years ago

Issue fixed by #58