0
Project ERROR: Cannot run compiler 'g++'. Output:
The system cannot find the path specified.
Project ERROR: Cannot run compiler 'g++'. Output:
===================
# 1 "C:/Qt/Qt5.15.2/5.15.2/mingw81_32/mkspecs/features/data/macros.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "C:/Qt/Qt5.15.2/5.15.2/mingw81_32/mkspecs/features/data/macros.cpp"
QT_COMPILER_STDCXX = 201402L
# 26 "C:/Qt/Qt5.15.2/5.15.2/mingw81_32/mkspecs/features/data/macros.cpp"
QMAKE_GCC_MAJOR_VERSION = 8
QMAKE_GCC_MINOR_VERSION = 1
QMAKE_GCC_PATCH_VERSION = 0
===================
Maybe you forgot to setup the environment?

For both 32 and 64bit version, and after a fresh installation.

2 Answers 2

1

Reason could be your system might not have g++ installed or path to g++ is not set.

  1. check g++ version

  2. if version not found than install g++ compiler

  3. Set PATH variable to g++ location . in linux g++ is in path - "/usr/bin/g++"

  4. Try Setting below variables in qmake file

    QMAKE_CC = gcc
    QMAKE_CXX = g++
    

try compiling through command line :

qmake projectName.pro -r -spec linux-g++
Sign up to request clarification or add additional context in comments.

Comments

0

For Ubuntu (20.04):

sudo apt install clang

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.