[cmake-developers] [CMake 0013643]: GenerateExportHeader should work for module libraries too
Mantis Bug Tracker
mantis at public.kitware.com
Fri Nov 2 06:13:47 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=13643
======================================================================
Reported By: Gregoire
Assigned To:
======================================================================
Project: CMake
Issue ID: 13643
Category: Modules
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-11-02 06:13 EDT
Last Modified: 2012-11-02 06:13 EDT
======================================================================
Summary: 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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-11-02 06:13 Gregoire New Issue
======================================================================
More information about the cmake-developers
mailing list