Hello. I've got quite strange problem - when I include <cv.h>, i'm getting a LOT of errors in opencv files like:

Qt Code:
  1. /usr/include/opencv2/core/types_c.h:1836:24: error: expected ‘;’ at end of member declaration
  2. /usr/include/opencv2/core/types_c.h:1836:24: error: expected unqualified-id before ‘<<’ token
  3. In file included from /usr/include/opencv/cv.h:63:0,
  4. from ../Eyes/camera.hxx:7,
  5. from ../Eyes/core.cpp:36:
  6. /usr/include/opencv2/core/core_c.h:1670:47: error: expected ‘,’ or ‘...’ before ‘<<’ token
  7. /usr/include/opencv2/core/core_c.h:1865:19: error: expected ‘;’ at end of member declaration
  8. /usr/include/opencv2/core/core_c.h:1865:19: error: expected unqualified-id before ‘<<’ token
To copy to clipboard, switch view to plain text mode 

and many others (172 errors)
when I'm compiling this code out of qtcreator with command

g++ `pkg-config opencv --cflags --libs` objectivetest.cpp -o test

Everything is alright, but I don't have to add any code to get theese errors - just including <cv.h> cause them. I've added this to eyes.pro file:

INCLUDEPATH += \
$$system(./scripts/libcfg --cflags opencv)

LIBS += \
$$system(./scripts/libcfg --libs opencv)

And both - highgui and cv are getting errors during compilation.