View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013767CMake(No Category)public2012-11-30 20:292016-06-10 14:31
ReporterPau Garcia i Quiles 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformUnix MakefilesOSWindowsOS VersionAll
Product VersionCMake 2.8.10.1 
Target VersionFixed in Version 
Summary0013767: Unix Makefiles + MSVC = cannot link
DescriptionA heated discussion on adopting CMake or not arised a few weeks ago in the mingw-w64 project:

http://thread.gmane.org/gmane.comp.gnu.mingw.w64.general/6338 [^]

Most of the issues pointed there are not real issues but lack of knowledge and/or the usual complaints ("I need CMake in order to compile a project that uses CMake").

Today Jonathan Yong did show one real issue: trying to use Unix Makefiles with MSVC.
Steps To Reproduce
This is what I have noticed:

* From the CMake GUI, even if you say "I will specify compilers" and select cl.exe for both C and C++, CMake will not find the resource compiler (rc.exe, apparently CMake is not looking in the Windows SDK folder), the linker (link.exe, apparently it's not looking for it where cl.exe is) and make.exe (CMake should look for Cygwin's and MinGW's, although it's going to be mostly a wild-guess)

* Even if specifying everything from the command line, linkage will not work because the library search directories have not been specified in either CMAKE_C_FLAGS, CMAKE_CXX_FLAGS or CMAKE_LINKER_FLAGS. What's missing is something like "/link /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib /LIBPATH:C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib" (remove the "/link" for CMAKE_LINKER_FLAGS).

Yes, I know, Unix Makefiles on Windows with MSVC!? :-)
Additional InformationSample huge command line that fails:

cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/cl.exe" -DCMAKE_RC_COMPILER="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1A/Bin/RC.Exe" -DCMAKE_LINKER="C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/link.exe" -DCMAKE_MAKE_PROGRAM="C:/mingw32/bin/mingw32-make.exe" ../xdelta3

See attache file error.txt for the full output
TagsNo tags attached.
Attached Filestxt file icon error.txt [^] (3,156 bytes) 2012-11-30 20:29 [Show Content]

 Relationships

  Notes
(0042165)
Kitware Robot (administrator)
2016-06-10 14:28

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.

 Issue History
Date Modified Username Field Change
2012-11-30 20:29 Pau Garcia i Quiles New Issue
2012-11-30 20:29 Pau Garcia i Quiles File Added: error.txt
2016-06-10 14:28 Kitware Robot Note Added: 0042165
2016-06-10 14:28 Kitware Robot Status new => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team