QT编译pro文件出现 error: Unexpected ‘else‘.

出错的代码段

win32{

INCLUDEPATH +=  opencv-410/include \
                opencv-410/include/opencv \
                opencv-410/include/opencv2 \
CONFIG += debug_and_release

CONFIG(debug, debug|release)
{
LIBS  += opencv-410/lib/opencv_world410d.lib \
}
else
{
LIBS += opencv-410/lib/opencv_world410.lib \
}
}

经排查是代码未按规范写,正确写法是将CONFIG(debug, debug|release)后面的大括号直接写在后面

QT编译pro文件出现 error: Unexpected ‘else‘._第1张图片

 

你可能感兴趣的:(QT)