lawrancej / CompilerKit

Compiler construction library in C.
GNU Lesser General Public License v2.1
55 stars 33 forks source link

Does not work with Visual Studio 2011 #1

Open vafaeed opened 12 years ago

vafaeed commented 12 years ago

CMake Warning at CMakeLists.txt:11 (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 CMake Warning at c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platfo rm/Windows-cl.cmake:28 (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): c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cma ke:60 (INCLUDE) CMakeLists.txt:11 (PROJECT)

CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found. Ple ase 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 c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platfo rm/Windows-cl.cmake:28 (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): c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cma ke:60 (INCLUDE) CMakeLists.txt:2 (PROJECT)

CMake Error at c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeRCI nformation.cmake:22 (GET_FILENAME_COMPONENT): get_filename_component called with incorrect number of arguments Call Stack (most recent call first): c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-cl.c make:28 (ENABLE_LANGUAGE) c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cma ke:60 (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 c:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTes tCCompiler.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:11 (PROJECT)

CMake Error: your C compiler: "cl" was not found. Please set CMAKE_C_COMPILER to a valid compiler path or name. -- Configuring incomplete, errors occurred!

lawrancej commented 12 years ago

http://www.cmake.org/Wiki/CMake_Generator_Specific_Information

You may try this. (You'd need to change the paths, but it may work)

@echo off

 if not exist "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat" goto missing
 echo call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
 call "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"

 @set PATH=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin;%PATH%
 @set INCLUDE=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;%INCLUDE%
 @set LIB=C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;%LIB%
 goto :eof

 :missing
 echo Missing file
 echo "C:\Program Files\Microsoft Visual Studio 8\VC\vcvarsall.bat"
 goto :eof
lawrancej commented 12 years ago

In the main CompilerKit folder, do:

rm -rf build
mkdir build
cd build
cmake ..
cmake --build .
vafaeed commented 12 years ago

just tried this several times with vis studio 10 and 11 to no avail, I will just use Ubuntu