主要参考博客:https://blog.csdn.net/nicai_xiaoqinxi/article/details/104096219 主要在pro中添加如下的代码: CONFIG -= debug_and_release