I created a new question because I've substantially the same problem as this one, but I tried to compile a C example (not C++) automatically generated with S2i Harpia, using this command:
gcc test.c `pkg-config --libs --cflags opencv` -o test
Compilation fails because of this problem, so compilation completes successfully if I rename the source file with ".mm" extension. However, I installed everythin from scratch (I'm starting a new project) and it doesn't work from the beginning; instead I would want to work with the usual ".c" files.
The code I'm writing is in C -- not Objective-C and not C++ -- how can I tell the compiler to use the "old" OpenCV C interface?
EDIT: no problems with newest Ubuntu 12.04.