[CMake] cmake MinGW WinXP DevCPP Problems

Tomislav Adamic tomislav.adamic at zg.htnet.hr
Tue Apr 19 14:31:47 EDT 2005


So, I have installed Dev-Cpp IDE which includes MinGW
compiler and GNU make. I have set enviroment variables (PATH and gcc
variables) for my instalation. Now, I can use IDE to generate my make
files but there are some things that I don't like in that case, so I
turned to cmake. After unpacking (v 2.0.6) I wanted to try it with
simple program. So I created "hello.cpp" and "hello.h" in some dir.
Also, in the same dir there is "CMakeLists.txt" containing:

PROJECT (hello C++)
ADD_EXECUTABLE (hello hello.cpp)

After that I run cmake GUI -> configure... (Unix Makefiles generator
chosen)
It exits with following error:

Determining if the C compiler works failed with the following output:
process_easy: DuplicateHandle(In) failed (e=6)
C:/DeveloperTools/Dev-Cpp/bin/make.exe:
Interrupt/Exception caught (code = 0xc0000005, addr = 0x4fe5c7)

So, I think to myself, I guess it cannot find compiler or something...
after that I clean u my directory and run cmake on the same files
(hello.cpp, hello.h and CMakeLists.txt) but now from command line:

cmake . -G"Unix Makefiles"

which results with following:

-- Check for working C compiler: gcc.exe
-- Check for working C compiler: gcc.exe -- works
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp

Assuming, everything is fine, I do "make" and it breaks:

"Building dependencies. cmake.depends..."
"Building object file hello.o..."
process_begin: CreateProcess((null), o hello.o -c C:/Temp/hello.cpp, ...) failed.
make (e=2): The system cannot find the file specified.
"Building executable C:/Temp/hello.exe..."
process_begin: CreateProcess((null), hello.o -o C:/Temp/hello.exe, ...) failed.
make (e=2): The system cannot find the file specified.
make[1]: *** [C:/Temp/hello.exe] Error 2
make: *** [default_target] Error 2

So, what is happening here: is may "make.exe" somehow broken (which I
seriously doubt, becuse works fine with either manually written or
Dev-Cpp generated Makefile(s)) or there is something wrong with cmake,
or my config or... Please help... TIA



More information about the CMake mailing list