View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009997CMakeCMakepublic2009-12-04 10:152011-06-17 12:40
ReporterLluís Batlle 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMinGWOSOS Version
Product VersionCMake-2-6 
Target VersionCMake 2.8.5Fixed in VersionCMake 2.8.5 
Summary0009997: .def files are not passed to the mingw linker
DescriptionThe .def files set in the source files for a shared library is correctly passed to the msvc linker through /DEF:..., but they are trimmed off when using the mingw ld linker.
The mingw ld linker follows the rules specified in .def files passed as source inputs.
Additional InformationThere is a workaround:
using, under IF(MINGW), LINKER_FLAGS of the style "-Wl,myfile.def" in order to get the .def file included.
TagsNo tags attached.
Attached Files

 Relationships
related to 0009613closedBrad King VS2010 generator seems to ignore link_flags and module definition files (.DEFs) 
has duplicate 0011768closedDavid Cole Mingw target can not process .DEF files 

  Notes
(0025528)
Brad King (manager)
2011-02-21 14:52

This was mostly addressed by the fixes for issue 0009613:

   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=024d05ad [^]
   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0db2c850 [^]

The only thing that is missing is the value of CMAKE_LINK_DEF_FILE_FLAG in the platform files for the GNU toolchain on Windows. I've added the setting and enabled the test for this toolchain:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a61a8a5 [^]

One can work around the problem for any CMake 2.8.[01234] with this code:

  # This platform information is missing in CMake <= 2.8.4.
  if(NOT CMAKE_LINK_DEF_FILE_FLAG AND "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
    set(CMAKE_LINK_DEF_FILE_FLAG "-Wl,")
  endif()

 Issue History
Date Modified Username Field Change
2009-12-04 10:15 Lluís Batlle New Issue
2010-12-14 16:52 David Cole Assigned To => Bill Hoffman
2010-12-14 16:52 David Cole Status new => assigned
2011-02-03 17:47 David Cole Relationship added has duplicate 0011768
2011-02-21 14:51 Brad King Assigned To Bill Hoffman => Brad King
2011-02-21 14:51 Brad King Relationship added related to 0009613
2011-02-21 14:52 Brad King Note Added: 0025528
2011-02-21 14:56 Brad King Status assigned => closed
2011-02-21 14:56 Brad King Resolution open => fixed
2011-02-21 14:56 Brad King Platform => MinGW
2011-02-21 14:56 Brad King Target Version => CMake 2.8.5
2011-06-17 12:40 David Cole Fixed in Version => CMake 2.8.5


Copyright © 2000 - 2018 MantisBT Team