[CMake] Fortran good and bad

Biddiscombe, John A. biddisco at cscs.ch
Mon Feb 21 14:33:48 EST 2011


First off, I just upgraded to cmake 2.8.4 (from 2.8.2) and the visual studio + intel fortran support is much much better. Thank you whoever fixed it up. Projects generate correctly and build out of the box
(Intel Fortran 10.x + visual studio 2008) - previously I had to generate nmake makefiles first and then switch to visual studio once the fortran compiler was detected.

Thanks to the success of the above, I tried to generate a project using the visual studio 2010 generator and intel fortran composer 11.something. It failed with the attached output. Something simple I expect. Can anyone see what's gone wrong from the following ....

==================

Determining if the Fortran compiler works failed with the following output:
Change Dir: D:/cmakebuild/super3/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 21/02/2011 20:26:17.

Project "D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" on node 1 (default targets).

InitializeBuildStatus:

  Creating "cmTryCompileExec.dir\Debug\cmTryCompileExec.unsuccessfulbuild" because "AlwaysCreate" was specified.

ManifestResourceCompile:

  C:\Program Files (x86)\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 (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\cmakebuild\super3\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:"D:\cmakebuild\super3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:/cmakebuild/super3/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.lib" /MACHINE:X64 cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res

LINK : error LNK2001: unresolved external symbol mainCRTStartup [D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

D:\cmakebuild\super3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe : fatal error LNK1120: 1 unresolved externals [D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

Done Building Project "D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" (default targets) -- FAILED.



Build FAILED.



"D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj" (default target) (1) ->

(Link target) -> 

  LINK : error LNK2001: unresolved external symbol mainCRTStartup [D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]

  D:\cmakebuild\super3\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe : fatal error LNK1120: 1 unresolved externals [D:\cmakebuild\super3\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]



    0 Warning(s)

    2 Error(s)



Time Elapsed 00:00:00.39





More information about the CMake mailing list