Qt项目报错:Cannot run compiler ‘clang++‘. /bin/sh: 1: clang++: not found

在一台旧电脑上装了深度系统,装了Qt,导入项目, build提示 clang++找不到:

Project ERROR: Cannot run compiler 'clang++'. Output:

===================

/bin/sh: 1: clang++: not found

===================

Maybe you forgot to setup the environment?

Error while parsing file /home/zhouyingge1104/repos/AimAlgo/AimAlgo.pro. Giving up.

解决方法:安装clang

sudo apt-get install clang

安装完成后,在终端进行测试:clang -v

Qt项目报错:Cannot run compiler ‘clang++‘. /bin/sh: 1: clang++: not found_第1张图片

 在QtCreator中查看Options, C++相关的都自动识别了:

Qt项目报错:Cannot run compiler ‘clang++‘. /bin/sh: 1: clang++: not found_第2张图片

 

参考:debian - /bin/sh: clang++: command not found - Unix & Linux Stack Exchange

你可能感兴趣的:(Qt开发,linux,ubuntu,运维)