我有Mac OS Lion 10.7.5和xCode 4.6。我已经下载了opencv template。然后检索一个框架,并想要创建我自己的项目。对于第一个我安装cmake 2.8.10,添加一个框架,就是这样。在main.m中,我尝试创建一个窗口:
#import <UIKit/UIKit.h>
#include "opencv2/highgui/highgui_c.h"
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
IplImage* img = cvLoadImage("1.png", 8);
cvNamedWindow("Example",CV_WINDOW_AUTOSIZE); //Thread 1: signal SIGANRT
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
在调试区域,我得到了以下内容:
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file /Volumes/minijHome/Documents/xcode_mini/hillegass/advancedIOS/postCourse/openCV/clean-downloads/openCVgitClone/opencv/modules/highgui/src/window.cpp, line 652
libc++abi.dylib: terminate called throwing an exception
我该怎么做?