(using "mp-gcc49")
/Users/oisin/Documents/code/vision/opencv-2.4.10/modules/highgui/src/window_cocoa.mm: In function 'void cvDestroyAllWindows()': /Users/oisin/Documents/code/vision/opencv-2.4.10/modules/highgui/src/window_cocoa.mm:202:23: error: expected ';' before 'in' for(NSString *key in list) {
(using "apple-gcc42")
/System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected ')' before '(' token - (void)modernizeWithCompletionHandler:(void (^)(void))handler AVAILABLE_QTKIT_VERSION_7_7_3_AND_LATER; ^ /System/Library/Frameworks/QTKit.framework/Headers/QTMovieModernizer.h:123:46: error: expected identifier before '(' token
The problem appears to be Objective-C stuff in QTKit and in OpenCV's HighGUI code. This time, the solution was to revert to the system-default C/C++ compiler, Clang:
$ sudo port select gcc none Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. Selecting 'none' for 'gcc' succeeded. 'none' is now active.
It's slightly counterintuitive that "port select gcc none" is how you go back to the system compiler with Macports, and it doesn't appear to be stated in the docs, so... well here it is!