Community
cancel
Showing results for 
Search instead for 
Did you mean: 
csH2
Beginner
2,311 Views

Build using cmake failed “is not able to compile a simple test program.”

Jump to solution

I tried to build  my project using CMake but it failed with error “is not able to compile a simple test program.” Anyone can help?

The detailed information is as follows:

 

-- Detecting Fortran compiler ABI info  
-- Detecting Fortran compiler ABI info - failed  
-- Check for working Fortran compiler: D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe  
-- Check for working Fortran compiler: D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe- broken   CMake Error at D:/Program Files/CMake/share/cmake-3.18/Modules/CMakeTestFortranCompiler.cmake:51 (message):   The Fortran compiler

    "D:/Program Files/IVF/compilers_and_libraries_2018.3.210/windows/bin/intel64/ifort.exe"

  is not able to compile a simple test program.  It fails with the following output:

   Change Dir: C:/Users/xxx/build/CMakeFiles/CMakeTmp

   Run Build Command(s):D:/PROGRA~2/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe cmTC_809ef/fast && mingw32-make.exe[1]: Entering directory  'C:/Users/xxx/build/CMakeFiles/CMakeTmp' 
   D:/PROGRA~2/MINGW-~1/X86_64~1.0-P/mingw64/bin/mingw32-make.exe  -f CMakeFiles\cmTC_809ef.dir\build.make CMakeFiles/cmTC_809ef.dir/build   
   mingw32-make.exe[2]: Entering directory 'C:/Users/xxx/build/CMakeFiles/CMakeTmp'    
   Building Fortran object CMakeFiles/cmTC_809ef.dir/testFortranCompiler.f.obj  
   D:\PROGRA~2\IVF\COMPIL~1.210\windows\bin\intel64\ifort.exe  /nologo /fpp   /W1 /nologo /fpp /libs:dll /threads  /Od /debug:full /dbglibs /FoCMakeFiles\cmTC_809ef.dir\testFortranCompiler.f.obj  /FdCMakeFiles\cmTC_809ef.dir/ -c C:\Users  xxx\build\CMakeFiles\CMakeTmp\testFortranCompiler.f 
   warning #31001: The dll for reading and writing the pdb (for example,  mspdb110.dll) could  not be found on your path. This is usually a configuration error. Compilation will continue using /Z7 instead of /Zi, but expect a similar err r when you link your program. 
   Linking Fortran executable cmTC_809ef.exe    
   "D:\Program  Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_809ef.dir\link.txt --verbose=1    
   "D:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_809ef.dir --rc=rc --mt="" --manifests -- xilink /nologo @CMakeFiles\cmTC_809ef.dir\objects1.rsp /out:cmTC_809ef.exe /implib:cmTC_809ef.lib /pdb:C:\Users\xxx\build\CMakeFiles\CMakeTmp\cmTC_809ef.pdb /version:0.0 /machine:x64  /debug /INCREMENTAL:YES /subsystem:console user32.lib    
   RC Pass 1: command "rc /fo CMakeFiles\cmTC_809ef.dir/manifest.res CMakeFiles\cmTC_809ef.dir/manifest.rc" failed (exit code 0) with the following output:   
   The system cannot find the file specified.mingw32-make.exe[2]: *** [CMakeFiles\cmTC_809ef.dir\build.make:107: cmTC_809ef.exe] Error -1   mingw32- 
   make.exe[2]: Leaving directory 'C:/Users/xxx/build/CMakeFiles/CMakeTmp'          

 

 

0 Kudos
1 Solution
Steve_Lionel
Black Belt Retired Employee
2,282 Views

The better solution is to start your command line session using the shortcut provided or call ipsxe-comp-vars.bat from your script to establish the proper environment.

View solution in original post

3 Replies
csH2
Beginner
2,295 Views

The problem has been solved by adding the right path for rc.exe to the PATH variable.

Steve_Lionel
Black Belt Retired Employee
2,283 Views

The better solution is to start your command line session using the shortcut provided or call ipsxe-comp-vars.bat from your script to establish the proper environment.

View solution in original post

JohnNichols
Valued Contributor I
2,275 Views

Or use Visual Studio -- that works a treat and is even colour coded. 

Reply