I just start a new flutter project in vscode , when I want debugging the project , I got Error:
Could not find compiler set in environment variable CXX:
clang++.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Exception: Unable to generate build files
I search on internet , and I found my "cmake" package , doesn't have g++.exe , so install it manually by following command line:
sudo apt-get install g++
but it doesn't work , how can I solve it?
CXX
environment variable seems to be set toclang++
, notg++
. So either you need to installclang++
or you need to configure your environment better. – Cronersudo apt-get install clang
and i get a new error :CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message): A required package was not found Call Stack (most recent call first): /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal) flutter/CMakeLists.txt:25 (pkg_check_modules) 2 Exception: Unable to generate build files
– Infinitude