cmake funktioniert nicht in windows XP
Ich bin neu mit cmake
,es gerade installiert und folgenden Artikel:
http://www.cs.swarthmore.edu/~adanner/tips/cmake.php
D:\Works\c\cmake\build>cmake ..
-- Building for: NMake Makefiles
CMake Warning at CMakeLists.txt:2 (project):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Warning at D:/Tools/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:32 (ENABLE_LANGUAGE):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
Call Stack (most recent call first):
D:/Tools/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:58 (INCLUDE)
CMakeLists.txt:2 (project)
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Please set CMAKE_RC_COMPILER to a valid compiler path or name.
-- Check for CL compiler version
-- Check for CL compiler version - failed
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - yes
-- Using FREE VC TOOLS, NO DEBUG available
-- Check for working C compiler: cl
CMake Warning at CMakeLists.txt:2 (PROJECT):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
CMake Warning at D:/Tools/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:32 (ENABLE_LANGUAGE):
To use the NMake generator, cmake must be run from a shell that can use the
compiler cl from the command line. This environment does not contain
INCLUDE, LIB, or LIBPATH, and these must be set for the cl compiler to
work.
Call Stack (most recent call first):
D:/Tools/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:58 (INCLUDE)
CMakeLists.txt:2 (PROJECT)
CMake Error at D:/Tools/CMake 2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):
get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
D:/Tools/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:32 (ENABLE_LANGUAGE)
D:/Tools/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:58 (INCLUDE)
CMakeLists.txt:2 (PROJECT)
CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: cl -- broken
CMake Error at D:/Tools/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
The C compiler "cl" is not able to compile a simple test program.
It fails with the following output:
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name.
CMake Error: your CXX compiler: "cl" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!
Was sind die vollständigen Anforderungen für den Einsatz cmake
erfolgreich in windows XP?Ich habe bereits Visual Studio installiert unter D:\Tools\Microsoft Visual Studio 9.0
- Zum Glück gibt es bessere Optionen für build-DSL Sprachen für .NET jetzt, wie eine Bibliothek namens FAKE.
Du musst angemeldet sein, um einen Kommentar abzugeben.
Zunächst muss ich gestehen, dass ich nicht weiß cmake.
Den Fehler oben bedeutet, dass die richtigen Standorte, um Ihren C/C++ - compiler die Header und Bibliotheken, die nicht gefunden werden konnte, die von cmake.
Anstelle von cmake läuft von der Eingabeaufforderung, versuchen Sie es mit cmake aus der Visual Studio 2008-Eingabeaufforderung. Sie finden es unter Start > Programme > Microsoft Visual Studio 2008 > Visual Studio Tools) oder vcvarsall.bat in den Ordner *Microsoft Visual Studio 9.0\VC*. Die visual Studio 2008-Eingabeaufforderung sollten alle diese Umgebungsvariablen automatisch für Sie, so dass cmake weiß, wo die notwendigen Dateien, die es braucht.
Die Eingabeaufforderung starten Sie in Ihrem Visual Studio-Ordner, so müssen Sie geben Sie die folgenden Befehle, um wechseln Sie zu Ihrem Quell-Ordner, und starten Sie cmake.
Ich hoffe das hilft dir.
Ich hatte ähnliche Probleme auf Win7, und war immer den gleichen Fehler, Den C-compiler "cl.exe" nicht in der Lage zu kompilieren, ein einfaches test-Programm.
Die Lösung, die für mich gearbeitet :
Unter Windows Donot cmake auf die cygwin-terminal.
Führen Sie es von der Eingabeaufforderung, UND stellen außerdem sicher, dass Sie admin-Rechte In windows 7 können Sie starten Sie die Eingabeaufforderung als administrator, indem Sie auf Start->Alle Programme->Zubehör-> (Rechtsklick auf Eingabeaufforderung) und Wählen Sie "als administrator Ausführen"
Führen
'cmake <your source>'
Arbeitete wie ein Charme für mich.