I have been having problems with running c++ programs on ubuntu 20.04. The problem is, that even I write legit code that the compiler can understand, the same error occurs saying that «Error: build command ‘cmake’ not foundFailure running cmake: » I have tried Eclipse and Visual Studio code. I haven’t encountered this problem on windows however.Can someone help with that.
asked Jul 12, 2021 at 5:12
You’re missing cmake
, install it by running this command in Terminal:
sudo apt install cmake
answered Jul 12, 2021 at 5:18
SurvivalMachineSurvivalMachine
2,7756 gold badges21 silver badges31 bronze badges
1
This post helps you to fix the «cmake: command not found» error encountered during the build process of your software. There are two major reasons for getting cmake command errors, either cmake is not installed or Path is not correctly set up. It doesn’t matter, which operating system you have. Following this post step by step will get this issue resolved for sure.
Below mentioned are the types of errors that occur while working with the «cmake» command —
- cmake: command not found
- cmake command not found macOS
- autogen.sh cmake command not found
- /bin/sh cmake command not found
- ‘cmake’ is not recognized as an internal or external command, operable program or batch file
- command ‘cmake’ not found
- bash: /snap/bin/cmake: No such file or directory
Table of Contents
- 1 Why am I getting the «cmake: command not found» error?
- 2 How to fix CMake: command not found error in macOS
- 3 How to check «CMake» package is installed or not
- 4 How to fix command ‘cmake’ not found error in Linux
- 5 How to fix ‘cmake’ is not recognized as an internal or external command, operable program or batch file error in Windows
- 6 How to install CMake in Docker
- 7 End note
- 8 Other helpful articles
Why am I getting the «cmake: command not found» error?
Following are the reason for getting the cmake command not found issue —
- cmake is not installed in your operating system
- cmake is installed but PATH or environmental variable is not setup correctly
Let’s assume you are trying to build software which is trying to run «build && cmake» commands and you are getting cmake errors. It means you don’t have the CMake package installed in your macOS.
To solve this CMake issue, we will follow 3 steps approach —
- Check if CMake is installed or not
- If it’s not installed, install the cmake using the right way.
- If CMake is installed but not working, then look for the PATH variable.
The above-mentioned approach is applicable to all operating systems whether it’s Windows, Debian, RedHat or macOS.
How to check «CMake» package is installed or not
The best way is to run the CMake command —
- Open a terminal in macOS
- Run
cmake
command see the output
$ cmake
If it shows the cmake help, then cmake is installed in your system and your life is sorted, else you need to install cmake using the following command.
$ brew install cmake
- Alternatively, you can also go to the cmake download page and download the precompiled binaries as disk image «.dmg» or «.tar.gz» (tarball) binary as per your macOS version.
- Copy CMake.app into /Applications (or a custom location) and then double click to run it. Then follow the “How to Install For Command Line Use” menu item
Once you install the cmake it will automatically be available in the PATH. but in case you don’t have that automatically and get the cmake: command not found error, then you need to set up the cmake PATH manually using the following commands —
How to setup PATH for cmake in macOS
- Open
.bash_profile
or.bashrc
in your home directory using vim or nano editor. - Add the following line to the end of the file and save the file.
export PATH=»/Applications/CMake.app/Contents/bin»:»$PATH»
- If you want to create symlinks to ‘/usr/local/bin’, run the following command from the terminal
$ sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
How to fix command ‘cmake’ not found error in Linux
If you use Ubuntu or any other Debian-based Linux and get «cmake: command not found errors«, then follow these series of commands —
Step-1 check for existing cmake installation
As shown in the above image, cmake is not installed in my Linux system.
Step2- Install cmake, if not installed already
How to install cmake in Linux — 4 Methods
There are 4 ways to install cmake in your Debian Linux system like Ubuntu, LinuxMint, Kubuntu, Kali Linux etc.
- 1. Using the apt command
Run the following commands —
$ sudo apt update $ sudo apt install cmake
- 2. Using the snap command as the apt command is going to obsolete soon
$ sudo snap install cmake --classic
- By using pre-compiled binaries available on the make download page.
- 3. Download the cmake-3.24.2-linux-x86_64.sh file and execute it.
$ bash cmake-3.24.2-linux-x86_64.sh
- Accept license by typing «y» and either accept the default location to install or provide your custom directory.
** Note — whatever the directory location you will provide in the above step, the same path you need to include in $PATH manually if the cmake command gives you an error.
For example, in my case, I will add the following line to the last of .bashrc
or .bash_profile
file in the user’s home directory
$ export PATH=$PATH:/home/dev/Downloads/cmake-3.24.2-linux-x86_64/bin
- Check the command
"cmake"
is running successfully
$ cmake
How to fix ‘cmake’ is not recognized as an internal or external command, operable program or batch file error in Windows
In the case of the Windows operating system, if you get cmake command errors, then follow the below-mentioned process to fix it.
- Download cmake binaries from the cmake website
- Double-click on the installer and click «
next
» on the welcome page - Accept the license and hit
next
in the wizard
- Important step — Select the option to add the CMake directory to the system PATH.
You will get 3 options —
- Do not add CMake to the system PATH — If you have selected this option, then you need to add the CMake path manually in the system after installation. That is one of the reasons when you have cmake installed and still, you get «‘cmake’ is not recognized as an internal or external command» error. So don’t select this option.
- Add CMake to the system PATH for all users — If you log in with different users to your system, then you can select this option. It will set up the cmake PATH variable for all users, who is present on the system.
- Add CMake to the system PATH for the current user — If you are the only user, then this is the recommended option.
You can select either option 2 or 3 based on your requirement, both will set up the PATH variable in your environment and will fix the cmake command errors.
- Select custom or leave it to default for the cmake installation directory.
- Then Click
Install
and accept select «Yes» in case of user control dialogue box permission
- Click Finish, once the cmake installation is done
- Open the command prompt and run the
cmake
command to validate.
c:> cmake
How to install CMake in Docker
Add this line to install CMake in the Docker file —
#!/bin/bash wget -qO- "https://github.com/Kitware/CMake/releases/download/v3.24.2/cmake-3.24.2-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local
Change the version with your required version, I have shown an example of v3.24.2 latest available while writing this article. If you get the error wget command not found, then add appt update && apt install wget in your file.
End note
The fundamental approach is the same to troubleshoot the CMake command not found error in all operating systems —
- Check for cmake installation
- Install cmake as shown in this post for your operating systems
- setup PATH or Environment variable, if required
- Run cmake and build apps
Leave your feedback or comments, if you face any other issues in the cmake command.
Other helpful articles
- Yarn command not found error
- Sudo command not found error
- Fix «mkvirtualenv command not found» error
- Nodemon command not found
- Nodemon app crashed — Waiting for file changes before starting
- Keytool command issues
- Cmake command errors
Я только что установил eclipse photon и установил компилятор minGW. Я не могу запустить ни одну программу. Когда я пытаюсь запустить свою программу на C, я получаю эту ошибку
Error: build command ‘cmake’ not foundFailure running cmake
Тогда, возможно, вам нужно установить cmake.
— Antti Haapala
29.08.2018 20:43
Можешь добавить немного подробностей? как вы запускаете свою программу c? вы импортируете проект cmake?
— Srini
29.08.2018 21:19
REACT и NEXT JS вместе с Tailwind CSS
Наличие собственного или персонального сайта необходимо в современном мире, а сочетание React и Next JS позволяет разработчику сделать это за меньшее…
В чем разница между HTML4 и HTML5?
HTML4 и HTML5 — это версии HTML, стандартного языка разметки, используемого для создания веб-страниц. Некоторые из ключевых различий между HTML4 и…
Ответы
1
Окно -> Настройки -> C / C++ -> Сборка -> Среда :: Добавьте свой путь, перезапустите
Другие вопросы по теме
Linux
- 20.12.2016
- 9 839
- 4
- 07.03.2019
- 10
- 9
- 1
- Содержание статьи
- Описание
- Комментарии к статье ( 4 шт )
- Добавить комментарий
В данной статье будут даны рекомендации о том, что делать в случаях, когда при попытке собрать что-либо из исходников, вы получаете ошибку, говорящую о том, что cmake не найден в вашей системе.
Описание
Эту ошибку очень часто можно встретить при начале компиляции чего-либо из исходного кода в дистрибутивах, которые имеют в своем названии minimal. Например, Ubuntu-1610-yakkety-64-minimal
cmake: command not found
Она означает, что в вашей системе не найдена кроссплатформенная система автоматизации сборки программного обеспечения из исходного кода (она же и есть cmake). Для установки cmake в большинстве современных дистрибутивов достаточно сделать следующее:
sudo apt-get update
sudo apt-get install cmake
После этого можно пробовать запустить cmake еще раз.
СMake это набор кроссплатформенных утилит для сборки программ из исходного кода на разных компиляторах и операционных системах. Непосредственно сборкой она не занимается, а только генерирует Makefile, который потом будет выполнен утилитой make.
Если утилита cmake не установлена в Linux, то при запуске команды компиляции вы получите ошибку:
cmake: command not found
Попробуйте вручную запустить команду cmake с указанием абсолютного пути:
/usr/bin/cmake –version
Проверьте, что путь к каталогу с командой cmake указан в переменной окружения $PATH:
echo $PATH
Если нужно, добавьте путь в $PATH.
Рассмотрим, как установить команду make в разных версиях Linux.
Для установки cmake в Ubuntu и Debian (и других deb системах), выполните:
sudo apt-get update
sudo apt-get install cmake
Также можно сразу установить метапакет build-essential, в который входит полный набор утилит для компиляции, в том числе cmake:
sudo apt-get install build-essential
В rpm дистрибутивах (CentOS/RHEL/Fedora) можно установить cmake с помощью пакетного менеджера:
dnf install cmake
Также вы можете в любом дистрибутиве Linux скачать и установить последнюю версию cmake из исходных файлов:
wget https://github.com/Kitware/CMake/releases/download/v3.22.1/cmake-3.22.1-linux-x86_64.tar.gz
Распакуйте архив:
tar -zxvf cmake-3.22.1-linux-x86_64.tar.gz
Перейдите в каталог:
cd cmake-3.22.1-linux-x86_64
И выполните команды:
./bootstrap
Make
Соберите cmake:
sudo make install
Убедитесь, что cmake успешно установлена на вашем хосте, выведя ее версию:
cmake --version
Для сборки из исходников также используется команда CMake. Если она не установлена, появится ошибка cmake command not found.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
Sola1991 opened this issue
Jan 2, 2019
· 8 comments
Comments
This my 1st time trying to compile a project.
I’m following building instructions of MSYS2 Method Building-on-Windows
but I’m facing this error.
Cmake command is not found
$ cmake .. -G 'Unix Makefiles' -DUSE_SDL2_LIBS=1
bash: cmake: command not found
make
should have been downloaded & installed as part of:pacman --noconfirm --needed -Sy pkg-config make mingw-w64-i686-toolchain mingw-w64-i686-cmake mingw-w64-i686-zlib mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_mixer
I’m using Windows 10×64-bit.
Hm CMake should have been installed by mingw-w64-i686-cmake
, did you see any related errors when you run pacman? It’s also possible that it comes from a different package now; try installing mingw-w64-cmake
or just cmake
to see if it works.
MSYS2 still report the same error once I run the cmake argument.
This what I get after running thees code
$ pacman -Sy mingw-w64-cmake make
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys is up to date
error: target not found: mingw-w64-cmake
warning: make-4.2.1-1 is up to date -- reinstalling
$ pacman --noconfirm --needed -Sy pkg-config make mingw-w64-i686-toolchain mingw-w64-i686-cmake mingw-w64-i686-zlib mingw-w64-i686-SDL2 mingw-w64-i686-SDL2_image mingw-w64-i686-SDL2_mixer
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys is up to date
warning: pkg-config-0.29.2-1 is up to date -- skipping
warning: make-4.2.1-1 is up to date -- skipping
:: There are 17 members in group mingw-w64-i686-toolchain:
:: Repository mingw32
1) mingw-w64-i686-binutils 2) mingw-w64-i686-crt-git 3) mingw-w64-i686-gcc 4) mingw-w64-i686-gcc-ada 5) mingw-w64-i686-gcc-fortran 6) mingw-w64-i686-gcc-libgfortran
7) mingw-w64-i686-gcc-libs 8) mingw-w64-i686-gcc-objc 9) mingw-w64-i686-gdb 10) mingw-w64-i686-headers-git 11) mingw-w64-i686-libmangle-git 12) mingw-w64-i686-libwinpthread-git
13) mingw-w64-i686-make 14) mingw-w64-i686-pkg-config 15) mingw-w64-i686-tools-git 16) mingw-w64-i686-winpthreads-git 17) mingw-w64-i686-winstorecompat-git
Enter a selection (default=all):
warning: mingw-w64-i686-binutils-2.30-5 is up to date -- skipping
warning: mingw-w64-i686-crt-git-7.0.0.5285.7b2baaf8-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-ada-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-fortran-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-libgfortran-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-libs-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gcc-objc-7.4.0-1 is up to date -- skipping
warning: mingw-w64-i686-gdb-8.2.1-1 is up to date -- skipping
warning: mingw-w64-i686-headers-git-7.0.0.5285.7b2baaf8-1 is up to date -- skipping
warning: mingw-w64-i686-libmangle-git-7.0.0.5230.69c8fad6-1 is up to date -- skipping
warning: mingw-w64-i686-libwinpthread-git-7.0.0.5273.3e5acf5d-1 is up to date -- skipping
warning: mingw-w64-i686-make-4.2.1-2 is up to date -- skipping
warning: mingw-w64-i686-pkg-config-0.29.2-1 is up to date -- skipping
warning: mingw-w64-i686-tools-git-7.0.0.5272.d66350ea-1 is up to date -- skipping
warning: mingw-w64-i686-winpthreads-git-7.0.0.5273.3e5acf5d-1 is up to date -- skipping
warning: mingw-w64-i686-winstorecompat-git-7.0.0.5230.69c8fad6-1 is up to date -- skipping
warning: mingw-w64-i686-cmake-3.12.4-1 is up to date -- skipping
warning: mingw-w64-i686-zlib-1.2.11-5 is up to date -- skipping
warning: mingw-w64-i686-SDL2-2.0.9-1 is up to date -- skipping
warning: mingw-w64-i686-SDL2_image-2.0.4-1 is up to date -- skipping
warning: mingw-w64-i686-SDL2_mixer-2.0.4-1 is up to date -- skipping
Checked the mingw-w64-i686-cmake
package, it does provide CMake, but seems it’s not on your PATH for some reason (and probably the other 32-bit binaries aren’t either). Try installing mingw-w64-x86_64-cmake
, it should add CMake and then we’ll see if it founds the other parts.
Same issue; I see the pkg has been installed tough.
here is the log
$ pacman -Sy mingw-w64-x86_64-cmake
:: Synchronizing package databases...
mingw32 is up to date
mingw64 is up to date
msys is up to date
resolving dependencies...
looking for conflicting packages...
Packages (38) mingw-w64-x86_64-brotli-1.0.7-1 mingw-w64-x86_64-bzip2-1.0.6-6 mingw-w64-x86_64-c-ares-1.15.0-1 mingw-w64-x86_64-ca-certificates-20180409-1 mingw-w64-x86_64-curl-7.63.0-1
mingw-w64-x86_64-expat-2.2.6-1 mingw-w64-x86_64-gcc-libs-8.2.1+20181214-1 mingw-w64-x86_64-gettext-0.19.8.1-7 mingw-w64-x86_64-gmp-6.1.2-1 mingw-w64-x86_64-jansson-2.12-1
mingw-w64-x86_64-jemalloc-5.1.0-3 mingw-w64-x86_64-jsoncpp-1.8.4-3 mingw-w64-x86_64-libarchive-3.3.3-2 mingw-w64-x86_64-libffi-3.2.1-4 mingw-w64-x86_64-libiconv-1.15-3
mingw-w64-x86_64-libidn2-2.0.5-1 mingw-w64-x86_64-libmetalink-0.1.3-3 mingw-w64-x86_64-libpsl-0.20.2-1 mingw-w64-x86_64-libssh2-1.8.0-3 mingw-w64-x86_64-libsystre-1.0.1-4
mingw-w64-x86_64-libtasn1-4.13-1 mingw-w64-x86_64-libtre-git-r128.6fb7206-2 mingw-w64-x86_64-libunistring-0.9.10-1 mingw-w64-x86_64-libuv-1.24.1-1
mingw-w64-x86_64-libwinpthread-git-7.0.0.5273.3e5acf5d-1 mingw-w64-x86_64-lz4-1.8.3-1 mingw-w64-x86_64-lzo2-2.10-1 mingw-w64-x86_64-mpc-1.1.0-1 mingw-w64-x86_64-mpfr-4.0.1-2
mingw-w64-x86_64-nettle-3.4.1-1 mingw-w64-x86_64-nghttp2-1.35.1-1 mingw-w64-x86_64-openssl-1.1.1.a-1 mingw-w64-x86_64-p11-kit-0.23.14-1 mingw-w64-x86_64-rhash-1.3.6-2
mingw-w64-x86_64-xz-5.2.4-1 mingw-w64-x86_64-zlib-1.2.11-5 mingw-w64-x86_64-zstd-1.3.8-1 mingw-w64-x86_64-cmake-3.12.4-1
Total Download Size: 21.79 MiB
Total Installed Size: 156.76 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
mingw-w64-x86_64-gmp-6.1.2-1-any 486.0 KiB 266K/s 00:02 [#####################################################################] 100%
mingw-w64-x86_64-mpfr-4.0.1-2-any 338.3 KiB 512K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-mpc-1.1.0-1-any 78.9 KiB 1924K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libwinpthread-git-7.0.0.5273.3e5acf5d-1-any 43.3 KiB 1445K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-gcc-libs-8.2.1+20181214-1-any 578.6 KiB 559K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-c-ares-1.15.0-1-any 98.1 KiB 68.0K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-brotli-1.0.7-1-any 329.2 KiB 254K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-expat-2.2.6-1-any 158.7 KiB 630K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libiconv-1.15-3-any 616.3 KiB 561K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-gettext-0.19.8.1-7-any 3.1 MiB 597K/s 00:05 [#####################################################################] 100%
mingw-w64-x86_64-libunistring-0.9.10-1-any 625.6 KiB 565K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-libidn2-2.0.5-1-any 114.0 KiB 1932K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libmetalink-0.1.3-3-any 61.1 KiB 1970K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libpsl-0.20.2-1-any 101.9 KiB 1756K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libtasn1-4.13-1-any 186.3 KiB 773K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libffi-3.2.1-4-any 44.9 KiB 1953K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-p11-kit-0.23.14-1-any 296.0 KiB 664K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-ca-certificates-20180409-1-any 356.3 KiB 769K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-bzip2-1.0.6-6-any 81.3 KiB 1891K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-zlib-1.2.11-5-any 177.8 KiB 330K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-openssl-1.1.1.a-1-any 4.7 MiB 598K/s 00:08 [#####################################################################] 100%
mingw-w64-x86_64-libssh2-1.8.0-3-any 232.3 KiB 526K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-jansson-2.12-1-any 65.8 KiB 1530K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-jemalloc-5.1.0-3-any 306.3 KiB 633K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-nghttp2-1.35.1-1-any 201.0 KiB 280K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-curl-7.63.0-1-any 1144.9 KiB 486K/s 00:02 [#####################################################################] 100%
mingw-w64-x86_64-jsoncpp-1.8.4-3-any 284.3 KiB 618K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-lz4-1.8.3-1-any 133.7 KiB 541K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-lzo2-2.10-1-any 101.1 KiB 3.40M/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-libtre-git-r128.6fb7206-2-any 84.2 KiB 75.4K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-libsystre-1.0.1-4-any 24.0 KiB 0.00B/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-nettle-3.4.1-1-any 419.4 KiB 466K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-xz-5.2.4-1-any 297.7 KiB 595K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-zstd-1.3.8-1-any 369.4 KiB 557K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-libarchive-3.3.3-2-any 647.4 KiB 492K/s 00:01 [#####################################################################] 100%
mingw-w64-x86_64-libuv-1.24.1-1-any 187.6 KiB 439K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-rhash-1.3.6-2-any 163.9 KiB 656K/s 00:00 [#####################################################################] 100%
mingw-w64-x86_64-cmake-3.12.4-1-any 4.7 MiB 439K/s 00:11 [#####################################################################] 100%
(38/38) checking keys in keyring [#####################################################################] 100%
(38/38) checking package integrity [#####################################################################] 100%
(38/38) loading package files [#####################################################################] 100%
(38/38) checking for file conflicts [#####################################################################] 100%
(38/38) checking available disk space [#####################################################################] 100%
:: Processing package changes...
( 1/38) installing mingw-w64-x86_64-gmp [#####################################################################] 100%
( 2/38) installing mingw-w64-x86_64-mpfr [#####################################################################] 100%
( 3/38) installing mingw-w64-x86_64-mpc [#####################################################################] 100%
( 4/38) installing mingw-w64-x86_64-libwinpthread-git [#####################################################################] 100%
( 5/38) installing mingw-w64-x86_64-gcc-libs [#####################################################################] 100%
( 6/38) installing mingw-w64-x86_64-c-ares [#####################################################################] 100%
( 7/38) installing mingw-w64-x86_64-brotli [#####################################################################] 100%
( 8/38) installing mingw-w64-x86_64-expat [#####################################################################] 100%
( 9/38) installing mingw-w64-x86_64-libiconv [#####################################################################] 100%
(10/38) installing mingw-w64-x86_64-gettext [#####################################################################] 100%
(11/38) installing mingw-w64-x86_64-libunistring [#####################################################################] 100%
(12/38) installing mingw-w64-x86_64-libidn2 [#####################################################################] 100%
(13/38) installing mingw-w64-x86_64-libmetalink [#####################################################################] 100%
(14/38) installing mingw-w64-x86_64-libpsl [#####################################################################] 100%
(15/38) installing mingw-w64-x86_64-libtasn1 [#####################################################################] 100%
(16/38) installing mingw-w64-x86_64-libffi [#####################################################################] 100%
(17/38) installing mingw-w64-x86_64-p11-kit [#####################################################################] 100%
(18/38) installing mingw-w64-x86_64-ca-certificates [#####################################################################] 100%
(19/38) installing mingw-w64-x86_64-bzip2 [#####################################################################] 100%
(20/38) installing mingw-w64-x86_64-zlib [#####################################################################] 100%
(21/38) installing mingw-w64-x86_64-openssl [#####################################################################] 100%
(22/38) installing mingw-w64-x86_64-libssh2 [#####################################################################] 100%
(23/38) installing mingw-w64-x86_64-jansson [#####################################################################] 100%
(24/38) installing mingw-w64-x86_64-jemalloc [#####################################################################] 100%
(25/38) installing mingw-w64-x86_64-nghttp2 [#####################################################################] 100%
(26/38) installing mingw-w64-x86_64-curl [#####################################################################] 100%
(27/38) installing mingw-w64-x86_64-jsoncpp [#####################################################################] 100%
(28/38) installing mingw-w64-x86_64-lz4 [#####################################################################] 100%
(29/38) installing mingw-w64-x86_64-lzo2 [#####################################################################] 100%
(30/38) installing mingw-w64-x86_64-libtre-git [#####################################################################] 100%
(31/38) installing mingw-w64-x86_64-libsystre [#####################################################################] 100%
(32/38) installing mingw-w64-x86_64-nettle [#####################################################################] 100%
(33/38) installing mingw-w64-x86_64-xz [#####################################################################] 100%
(34/38) installing mingw-w64-x86_64-zstd [#####################################################################] 100%
(35/38) installing mingw-w64-x86_64-libarchive [#####################################################################] 100%
(36/38) installing mingw-w64-x86_64-libuv [#####################################################################] 100%
(37/38) installing mingw-w64-x86_64-rhash [#####################################################################] 100%
(38/38) installing mingw-w64-x86_64-cmake [#####################################################################] 100%
Optional dependencies for mingw-w64-x86_64-cmake
mingw-w64-x86_64-qt5: CMake Qt GUI
Sola@Sola MSYS /c/supermariowar/build
$ cmake .. -G 'Unix Makefiles' -DUSE_SDL2_LIBS=1
bash: cmake: command not found
Ah there’s the issue:
Sola@Sola
MSYS /c/supermariowar/build
You should launch the «MSYS2 MinGW 32-bit» command prompt, which adds /mingw32/bin
to your PATH.
Thanks @mmatyas,
You are totally correct. Now I’m able to run cmake & make arguments.
Hi. My situation is similar with Sola1991, but after I finish the steps above I had another error.
je55i@LAPTOP-JFI2G606 MINGW32 /d/Master/zacros/zacros_2.0/build
$ cmake .. -G»MSYS Makefiles»
CMake Error: CMake was unable to find a build program corresponding to «MSYS Makefiles». CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMake was unable to find a build program corresponding to «MSYS Makefiles». CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_AR was not found, please set to archive program.
— Configuring incomplete, errors occurred!
Hi, have you tried running CMake with -G 'Unix Makefiles'
? I’m not sure «MSYS Makefiles» works.