qt程序没问题,运行却出现问题

  1. qt打开工程,只显示.pro文件

  2. cannot run compiler ‘g++’.output:

  3. cannot run compiler ‘clang++’.output:
    1和3的解决方法皆为:
    sudo apt-get clang
    2的不清楚,我用的是clang++,不是g++

  4. Maybe you forgot to setup the environment?Error while parsing file /home/ruofu/test1/test1.pro. Giving up.Project ERROR: Cannot run compiler ‘g++’. Output:
    也许您忘记设置环境?
    解决方法:
    vi /etc/profile
    按a进入编辑,加入
    export PATH=$PATH:/usr/bin
    按esc,输入:wq保存退出。
    source /etc/profile
    更新环境变量即可。
    (这个路径,是我的clang++的路径,可在qt里的toolsoptionskits~compile中查看)
    如果使用qmake进行编译,则写到qmake的上一级路径

  5. cannot find -IGL/gl.h error
    解决方法:
    sudo apt-get install mesa-common-dev

  6. Could not determine which “make” command to run. Check the “make” step in the build configuration.Error while building/deploying project test1 (kit: Desktop Qt 5.12.4 GCC 64bit)When executing step “qmake”
    无法确定要运行哪个“make”命令。检查生成配置中的“make”步骤。构建/部署项目测试1时出错(套件:桌面 Qt 5.12.4 GCC 64 位)执行步骤“qmake”时。
    http://t.csdn.cn/k4yDE
    查看这个可以理解一些东西。

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值