[CMake] cmake MinGW WinXP DevCPP Problems
David Cole
david.cole at kitware.com
Tue Apr 19 15:36:10 EDT 2005
Running CMakeSetup from the same environment that gcc and make run in
should work when you're using MinGW. I'm not familiar with Dev-Cpp : do
you run it from an MSYS shell? Or does it know about MinGW independent
of having MSYS installed?
Try again with a fresh directory containing just your cpp, h and
CMakeLists.txt file. Launch CMakeSetup from a command prompt / MSYS
shell that has the environment set to run gcc... (Perhaps launch it from
within Dev-Cpp? Can it launch external tools easily?)
Sometimes when you've run cmake and CMakeSetup on the same tree, you get
confused about the state of things and it's easier to start fresh.
HTH,
David
Tomislav Adamic wrote:
>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
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>
>
More information about the CMake
mailing list