View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008541CMakeCMakepublic2009-02-16 08:222016-06-10 14:30
ReporterMartin Apel 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product VersionCMake-2-6 
Target VersionFixed in Version 
Summary0008541: LINK_FLAGS property interferes with implib option for MSVC linker
DescriptionWhen using the LINK_FLAGS property on a target to set additional options for a shared library under Windows, the import library is not generated into the correct place.
The nmake generator generates a wrong link command without any 'implib' directive, which causes the import library to be put into the same directory as the DLL.
Without the LINK_FLAGS property the problem does not occur.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0015326)
Bill Hoffman (manager)
2009-02-24 10:13

Can you attach an example of this?
(0015371)
Martin Apel (reporter)
2009-02-25 06:10

It's really strange. I tried to reproduce the issue with 2.6.3, but the problem is not exactly the same anymore. The version I used, when I reported the original issue, was 2.6.3RC13.

So this what happens now (which is still a problem with respect to the implib option):

When I link a shared library normally, i.e. a library containing C and C++ source files, CMake generates a link line as this:
        "C:\Programme\CMake 2.6\bin\cmake.exe" -E vs_link_dll C:\PROGRA~1\MICROS~2\VC\bin\link.exe @CMakeFiles\Base.dir\objects1.rsp
       /out:..\run\bin\win32\Base.dll /implib:Base.lib /pdb:E:\ma\new_arch\obj\opt\run\bin\win32\Base.pdb /dll /version:0.0 /MANIFEST /STACK:10000000 /machine:I386 /INCREMENTAL:NO ....

which contains the /implib statement.

One of my libraries consists of Fortran source files and the generated link line looks as follows:
link @CMakeFiles\FortranInterface.dir\objects1.rsp /out:..\run\bin\win32\FortranInterface.dll /dll /MANIFEST /STACK:10000000
/machine:I386 /INCREMENTAL:NO /DEF:FortranInterface.def

The implib statement is not there, no matter what LINK_FLAGS I set. In RC13 the implib statement was only missing if I set the LINK_FLAGS, but was there, if LINK_FLAGS were not set at all. The import library is generated into the directory, where the DLL itself resides, which has been set via CMAKE_RUNTIME_OUTPUT_DIRECTORY.
Sorry if this sounds irritating, but I tried for two hours to reproduce the original problem.

Best Regards,

Martin
(0041503)
Kitware Robot (administrator)
2016-06-10 14:27

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
2009-02-16 08:22 Martin Apel New Issue
2009-02-24 10:13 Bill Hoffman Note Added: 0015326
2009-02-24 10:14 Bill Hoffman Status new => assigned
2009-02-24 10:14 Bill Hoffman Assigned To => Bill Hoffman
2009-02-25 06:10 Martin Apel Note Added: 0015371
2016-06-10 14:27 Kitware Robot Note Added: 0041503
2016-06-10 14:27 Kitware Robot Status assigned => resolved
2016-06-10 14:27 Kitware Robot Resolution open => moved
2016-06-10 14:30 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team