[CMake] problem compiling with cmake

Michael Hertling mhertling at online.de
Mon Mar 28 13:10:05 EDT 2011


On 03/28/2011 04:47 PM, João Oliveira wrote:
> 
> Hello, I am a student of Instituto Politecnico de Castelo Branco from Portugal and I having some problems compiling it is necessary to run the toolbox PCL. I am using cmake 2.8.4 and when I try to compile cminpack 1.0.4 the following error appears:
>  
> Check for working C compiler using: Visual Studio 10
> 
> Check for working C compiler using: Visual Studio 10 -- works
> Detecting C compiler ABI info
> Detecting C compiler ABI info - done
> Check for working CXX compiler using: Visual Studio 10
> Check for working CXX compiler using: Visual Studio 10 -- works
> Detecting CXX compiler ABI info
> Detecting CXX compiler ABI info - done
> Operating system is Windows
> Building static libraries.
> Check for working Fortran compiler using: Visual Studio 10
> Check for working Fortran compiler using: Visual Studio 10 -- broken
> CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:40 (MESSAGE):
> The Fortran compiler "ifort" is not able to compile a simple test program.
> 
> It fails with the following output:
> 
> Change Dir: C:/cminpack-1.0.4_build/CMakeFiles/CMakeTmp
> 
> 
> 
> Run Build Command:C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
> cmTryCompileExec.vcxproj /p:Configuration=Debug
> 
> Microsoft (R) Build Engine Version 4.0.30319.1
> 
> [Microsoft .NET Framework, Version 4.0.30319.1]
> 
> Copyright (C) Microsoft Corporation 2007. All rights reserved.
> 
> 
> 
> Build started 28-03-2011 15:39:29.
> 
> Project
> "C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" on
> node 1 (default targets).
> 
> InitializeBuildStatus:
> 
> Creating "cmTryCompileExec.dir\Debug\cmTryCompileExec.unsuccessfulbuild" because "AlwaysCreate" was specified.
> 
> ManifestResourceCompile:
> 
> C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo /fo"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res" cmTryCompileExec.dir\Debug\cmTryCompileExec_manifest.rc 
> 
> Link:
> 
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:QUEUE /OUT:"C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe" /VERSION:"0.0" /INCREMENTAL /NOLOGO /MANIFEST /ManifestFile:"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /PDB:"C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/cminpack-1.0.4_build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.lib" /MACHINE:X86 cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res
> 
> LINK : error LNK2001: unresolved external symbol _mainCRTStartup
> [C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> 
> C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe :
> fatal error LNK1120: 1 unresolved externals
> [C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> 
> Done Building Project
> "C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default targets) -- FAILED.
> 
> 
> 
> Build FAILED.
> 
> 
> 
> "C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default target) (1) ->
> 
> (Link target) -> 
> 
> LINK : error LNK2001: unresolved external symbol _mainCRTStartup [C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe : fatal error LNK1120: 1 unresolved externals [C:\cminpack-1.0.4_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> 
> 
> 
> 0 Warning(s)
> 2 Error(s)
> 
> 
> 
> Time Elapsed 00:00:00.37
> 
> 
> 
> 
> 
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> examples/CMakeLists.txt:31 (enable_language)
> 
> 
> Configuring incomplete, errors occurred!
>  
>  
> already communicated with the users http://www.willowgarage.com/ and forward my question to you all. grateful to give me some help. According to a previous user of the site: "problem is solved with 
> ifort 10.1. Sorry, ifort is the intel fortran compiler embedded with
> Microsoft Visual Studio, I am not sure how you can upgrade or if
> someone else solved this issue but you may email cmake users and see
> if somebody can help you out."
>  
> Once again I would appreciate help.
> 
> carefully, João Oliveira

http://www.cmake.org/Bug/view.php?id=11517

Regards,

Michael


More information about the CMake mailing list