[CMake] Unable to compile a simple test program

Lars Nygard lnygard at yahoo.com
Fri Jun 15 13:22:33 EDT 2007


Hi,

Im having some problems with cmake and Visual studio 2003 .NET. It has worked
good some time, but a few weeks I suddenly got "unable to compile a simple test program".
When I re-install visual studio, it sometimes works for a while but after a few configuration
i get this error. I can't understand what's wrong.
Ive tried re-installing windows, cmake and visual studio several times but this error is coming
back.
Can anybody give me some advice on how to analyse what's wrong? Im not that profficient
with either configuring visual studio or cmake.
Id really appreciate any help.
regards,
Lars Nygard

Im using Visual Studio .NET 2003, Window XP service pack2 (with all latest updates)
and Cmake 2.4 patch 6
This is part of the error file from cmake.
******************************************************************************
Determining if the C compiler works failed with the following output:

Building Custom Rule C:/Documents and Settings/lars/Desktop/Insight Toolkit/myPrograms/ImageRegistrationBin/CMakeFiles/CMakeTmp/CMakeLists.txt
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe -- broken
CMake Error: The C compiler "C:/Program Files/Microsoft Visual Studio .NET 2003/Vc7/bin/cl.exe" is not able to compile a simple test program.
It fails with the following output:
Microsoft (R) Development Environment  Version 7.10.3077.
Copyright (C) Microsoft Corp 1984-2001. All rights reserved.
------ Build started: Project: cmTryCompileExec, Configuration: Debug Win32 ------
cmTryCompileExec : warning PRJ0009 : Build log could not be opened for writing.
Make sure that the file is not open by another process and is not write-protected.
cmTryCompileExec : error PRJ0020 : Tool 'C/C++', Property 'Object File Name' contains invalid file name 'cmTryCompileExec.dir\Debug\testCCompiler.c'.
cmTryCompileExec : error PRJ0005 : Unable to create a temporary file in directory 'c:\Documents and Settings\lars\Desktop\Insight Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug'.
 
Build log was saved at "file://c:\Documents and Settings\lars\Desktop\Insight Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\Build" 
cmTryCompileExec - 2 error(s), 1 warning(s) 
---------------------- Done ----------------------
 
    Build: 0 succeeded, 1 failed, 0 skipped
 
CMake will not be able to correctly generate this project.
-- Configuring done
Compiling...
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.
cl /Od /D "_MBCS" /FD /RTCs /MDd /GS /Fo"cmTryCompileExec.dir\Debug\\" /Fd"Debug/cmTryCompileExec.pdb" /W3 /c /Zi /TC    /DWIN32 /D_WINDOWS  /Zm1000   /D_DEBUG        -DCMAKE_INTDIR=\"Debug\"
   ".\testCCompiler.c"
testCCompiler.c
Linking...
Microsoft (R) Incremental Linker Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.
"/OUT:Debug\cmTryCompileExec.exe" /VERSION:0.0 /INCREMENTAL /DEBUG "/PDB:Debug\cmTryCompileExec.pdb" /SUBSYSTEM:CONSOLE /STACK:10000000 /machine:I386 /debug kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib 
".\cmTryCompileExec.dir\Debug\testCCompiler.obj" 
 
Build log was saved at "file://c:\Documents and Settings\lars\Desktop\Insight Toolkit\myPrograms\ImageRegistrationBin\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm" 
cmTryCompileExec - 2 error(s), 1 warning(s) 
---------------------- Done ----------------------


	
	
		
_________________________________________________________
Alt i én. Få Yahoo! Mail med adressekartotek, kalender og
notisblokk. http://no.mail.yahoo.com


More information about the CMake mailing list