View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0013643 | CMake | Modules | public | 2012-11-02 06:13 | 2013-10-07 10:09 | ||||
Reporter | Gregoire | ||||||||
Assigned To | Stephen Kelly | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | OS | OS Version | |||||||
Product Version | |||||||||
Target Version | CMake 2.8.12 | Fixed in Version | |||||||
Summary | 0013643: GenerateExportHeader should work for module libraries too | ||||||||
Description | I am doing my tests with visual 2008 and mingw. As far as I understand a module is like a shared library that cannot be linked. Instead it is dynamically loaded and then we find and use symbols in it. It is like doing the linker's job manually at runtime. If nothing is exported from my module then I do cannot find any symbol in it. Or at least I do not know how to do so. I modified the GenerateExportHeader module to be able to export symbols from my MODULE: # if(${type} STREQUAL "MODULE") # message(WARNING "This macro should not be used with libraries of # type MODULE") return() # endif() if(NOT ${type} STREQUAL "STATIC_LIBRARY" AND NOT ${type} STREQUAL "SHARED_LIBRARY" AND NOT ${type} STREQUAL "MODULE_LIBRARY") message(WARNING "This macro can only be used with libraries") return() endif() | ||||||||
Steps To Reproduce | Build a module with visual without exported symbols. Use depends.exe (from http://www.dependencywalker.com/ [^]) to open the generated dll. It will not find any symbols which means that your application won't be able to find it either, the module is useless. | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0031491) David Cole (manager) 2012-11-08 09:25 |
This request does make sense. Even when building a module, you want to export the symbols. It's just that the consumer of it agrees not to link to it via its exports, but instead dynamically loads it, looks up the exports and then calls them at runtime. Don't forget: it's unusual, but possible to export symbols from executables as well. Just delete the restriction about "module" library type, and allow this to be called for all target types. |
(0033126) Stephen Kelly (developer) 2013-05-24 09:45 |
Fixed with 7ffef5024aa92a9802785c2e02abfd13249e6160 |
(0034062) Robert Maynard (manager) 2013-10-07 10:09 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2012-11-02 06:13 | Gregoire | New Issue | |
2012-11-08 04:22 | David Cole | Target Version | => CMake 2.8.11 |
2012-11-08 08:24 | Brad King | Assigned To | => Stephen Kelly |
2012-11-08 08:24 | Brad King | Status | new => assigned |
2012-11-08 09:25 | David Cole | Note Added: 0031491 | |
2013-05-17 09:33 | Robert Maynard | Target Version | CMake 2.8.11 => CMake 2.8.12 |
2013-05-24 09:45 | Stephen Kelly | Note Added: 0033126 | |
2013-05-24 09:45 | Stephen Kelly | Status | assigned => resolved |
2013-05-24 09:45 | Stephen Kelly | Resolution | open => fixed |
2013-10-07 10:09 | Robert Maynard | Note Added: 0034062 | |
2013-10-07 10:09 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |