I need some help compiling this project with cmake. Here is the error message.
$ ./build_avida
-- Building for: NMake Makefiles
CMake Warning at CMakeLists.txt:1
Those errors :
"CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage"
means you haven't installed mingw32-base.
Go to http://sourceforge.net/projects/mingw/files/latest/download?source=files
and then make sure you select "mingw32-base"
Make sure you set up environment variables correctly in PATH section. "C:\MinGW\bin"
After that open CMake and Select Installation --> Delete Cache.
And click configure button again. I solved the problem this way, hope you solve the problem.
The approach I use is to start the "Visual Studio Command Prompt" which can be found in the Start menu. E.g. my visual studio 2010 Express install has a shortcute Visual Studio Command Prompt (2010)
at Start Menu\Programs\Microsoft Visual Studio 2010\Visual Studio Tools
.
This shortcut prepares an environment by calling a script vcvarsall.bat
where the compiler, linker, etc. are setup from the right Visual Studio installation.
Alternatively, if you already have a prompt open, you can prepare the environment by calling a similar script:
:: For x86 (using the VS100COMNTOOLS env-var)
call "%VS100COMNTOOLS%"\..\..\VC\bin\vcvars32.bat
or
:: For amd64 (using the full path)
call C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\amd64\vcvars64.bat
Your output (with the '$' prompt) suggests that you are attempting to run CMake from a MSys shell. In that case it might be better to run CMake for MSys or MinGW, by explicitly specifying a makefile generator:
cmake -G"MSYS Makefiles"
cmake -G"MinGW Makefiles"
Run cmake --help
to get a list of all possible generators.
Even though I had gcc already installed, I had to run
sudo apt-get install build-essential
to get rid of that error
Try to install gcc
and gcc-c++
, as Cmake works smooth with them.
yum install gcc gcc-c++
apt-get install cmake gcc g++
Then,