[cmake-developers] Module.GenerateExportHeader crash

Brad King brad.king at kitware.com
Mon Aug 20 09:38:15 EDT 2012


On Sun, Aug 19, 2012 at 6:00 PM, Stephen Kelly <steveire at gmail.com> wrote:
> Can I get some help to resolve the issues reported here:
>
> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/4448/focus=4457

I think the main problem is that

 Tests/Module/GenerateExportHeader/libshared/CMakeLists.txt

constructs libshared_export.h with code

#    ifdef libshared_EXPORTS
        /* We are building this library */
#      define LIBSHARED_EXPORT __declspec(dllexport)
#    else
        /* We are using this library */
#      define LIBSHARED_EXPORT __declspec(dllimport)
#    endif

but compiles it in a target "libshared_c" so the _EXPORTS macro name
does not match and no symbols get exported from the C-only library.

-Brad



More information about the cmake-developers mailing list