问题
This is my first time using both Cygwin and cmake
, I'm trying to build a project but keep getting errors.
-bash: /usr/local/bin/cmake: cannot execute binary file
The questions I have are, where should cmake
be installed and how do I run it?
Where should my source code be?
Do I need anything extra to get cmake
to work in Cygwin?
Here is a link to the project I am trying to run: (https://github.com/erinaceous/shadows)
回答1:
cmake
is available in the Cygwin net distribution. You can install it with setup-x86*.exe
; you should find it under the Devel
category.
回答2:
Cygwin's mirrors are not always up-to-date. To build your own from source for Cygwin (these instructions assume some version of cmake is already installed on your system, as is a compiler (eg. g++):
- Download the latest (v3.4.1 at the time of this writing) source from CMake.org/files. Be sure to enter the folder and also enter the cygwin folder within, and download the latest version (eg. https://cmake.org/files/v3.4/cygwin/cmake-3.4.1-1.tar.bz2)
From cygwin, cd to the folder where you downloaded the tar.bz2 file and type:
tar xvjf cmake-{x.y.z}.tar.bz2 #for me, the actual filename was cmake-3.4.1-1.tar.bz2 cd cmake-{x.y.z} ./configure make
from there, you'll find your binaries in the ./bin folder.
来源:https://stackoverflow.com/questions/28410889/building-cmake-for-cygwin