MantisBT - CMake
View Issue Details
0014871CMakeCMakepublic2014-04-09 17:022016-06-10 14:31
vitaut 
Kitware Robot 
normalminoralways
closedmoved 
x86Windows7
CMake 2.8.11.2 
 
0014871: Error running link command when using gfortran on Windows with NMake Makefiles
Running CMake on a small test project that combines C++ and Fortran (https://github.com/vitaut/test [^]) results in the following error:

  Linking Fortran executable cmTryCompileExec108399929.exe


  "C:\Program Files\CMake 2.8\bin\cmake.exe" -E cmake_link_script
  CMakeFiles\cmTryCompileExec108399929.dir\link.txt --verbose=1


  "C:\Program Files\CMake 2.8\bin\cmake.exe" -E remove -f
  CMakeFiles\cmTryCompileExec108399929.dir/objects.a


  "" cr CMakeFiles\cmTryCompileExec108399929.dir/objects.a
  @CMakeFiles\cmTryCompileExec108399929.dir\objects1.rsp

I'm using MinGW's toolchain including gfortran version 4.8.1 on 32-bit Windows 7.
0. Install MinGW including mingw32-gcc-fortran package from http://www.mingw.org/wiki/Install_MinGW [^]

1. Clone the test repository:
   git clone https://github.com/vitaut/test.git [^]

2. Run CMake:
   cd test
   cmake -G "MinGW Makefiles" .

3. Observe the error.
No tags attached.
txt cmake-error-log.txt (2,061) 2014-04-09 17:02
https://public.kitware.com/Bug/file/5127/cmake-error-log.txt
Issue History
2014-04-09 17:02vitautNew Issue
2014-04-09 17:02vitautFile Added: cmake-error-log.txt
2014-04-09 17:04vitautNote Added: 0035662
2014-04-09 18:41vitautNote Edited: 0035662bug_revision_view_page.php?bugnote_id=35662#r1442
2014-04-10 12:59Brad KingSummaryError running link command when using gfortran on Windows => Error running link command when using gfortran on Windows with NMake Makefiles
2014-04-10 13:01Brad KingNote Added: 0035669
2014-04-10 13:01Brad KingStatusnew => backlog
2016-06-10 14:29Kitware RobotNote Added: 0042532
2016-06-10 14:29Kitware RobotStatusbacklog => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035662)
vitaut   
2014-04-09 17:04   
(edited on: 2014-04-09 18:41)
Sorry, I omitted the actual error message which is:

    Error running link command: The parameter is incorrect

And one more correction, I used "NMake Makefiles" generator, so the cmake command in item 2 should be:

    cmake -G "NMake Makefiles" .

(0035669)
Brad King   
2014-04-10 13:01   
I do not think the combination of gfortran with NMake Makefiles has ever been attempted before. Why do you need it?
(0042532)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.