Hallo, I got such issue when I start opencv C++ project on my Macbook with Intel chip and macOS 12.2.1, opencv4.5.5. I have test a simple code with imread and imshow, it can build in C++ successfully. but no window pops up, when I run it. And I have replaced imshow with imwrite, it works. It seems that I have correctly installed opencv, and only imshow not works.
code:
#include<opencv2/opencv.hpp>
#include<opencv2/highgui.hpp>
using namespace cv;
int main()
{
Mat img=imread(“1.jpg”);
cv::imshow(“image”,img);
cv::waitKey();
return 0;
}
here is the error info:
2022-04-03 14:11:51.173005+0200 display-picture[12338:1429307] SecTaskLoadEntitlements failed error=22 cs_flags=20, pid=12338
2022-04-03 14:11:51.173150+0200 display-picture[12338:1429307] SecTaskCopyDebugDescription: display-picture[12338]/0#-1 LF=0
2022-04-03 14:11:51.199856+0200 display-picture[12338:1429307] [default] error finding potential wrapper bundle for node <FSNode 0x600000201ce0> { isDir = ?, path = ‘/Users/Tevez/cv’ }: Error Domain=NSOSStatusErrorDomain Code=-10811 “kLSNotAnApplicationErr: Item needs to be an application, but is not” UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}
2022-04-03 14:11:51.201071+0200 display-picture[12338:1429307] [default] error finding potential wrapper bundle for node <FSNode 0x600000201ce0> { isDir = ?, path = ‘/Users/Tevez/cv’ }: Error Domain=NSOSStatusErrorDomain Code=-10811 “kLSNotAnApplicationErr: Item needs to be an application, but is not” UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}
2022-04-03 14:11:51.201119+0200 display-picture[12338:1429307] [default] error finding potential wrapper bundle for node <FSNode 0x600000201ce0> { isDir = ?, path = ‘/Users/Tevez/cv’ }: Error Domain=NSOSStatusErrorDomain Code=-10811 “kLSNotAnApplicationErr: Item needs to be an application, but is not” UserInfo={_LSLine=1579, _LSFunction=wrapperBundleNodeForWrappedNode}