ubuntu下,c++ 开发opencv,编译时没有报错, 运行时,发现报如下错 The library is compiled without QT support in function
原因是,安装编译时,未启用QT,报错如下
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.2.0) ~/opencv-4.2.0/opencv/modules/highgui/src/win
shell脚本报错:”[: =: unary operator expected”解决办法
在匹配字符串相等时,我用了类似这样的语句:
if [ $STATUS == OK ]; then
echo OK
fi
在运行时出现了 [: =: unary operator expected 的错误,就一直找不到原因,尝试了删除等号两侧的空格和括号里的空格都不管用,最后baidu了一下,才找到原因。把语句改成这样就不会出错了.
if [[ $STATUS = OK ]];