On 9/5/2012 3:52 PM, Micha Renner wrote:
> For static libraries the macro GENERATE_EXPORT_HEADER produce an output
> like this one:
> 
> ...
> #else
> #  ifndef CTEST_EXPORT
> #    ifdef cTest_EXPORTS
>         /* We are building this library */
> #      define CTEST_EXPORT 
> #    else
>         /* We are using this library */
> #      define CTEST_EXPORT 
> #    endif
> #  endif
> ...
> 
> For for a static version of a library CTEST_EXPORT is empty.
> 
> For Windows and the MSVC it is not always a good idea, since the MSVC
> can produce errors in this case.

What kind of errors? Are you sure that you're using the export macro
correctly?

> So I propose (static versions of libraries): For the MSVC and Windows
> CTEST_EXPORT should be defined with "extern", either by option or by
> default.

Applying extern to a class definition doesn't make any sense.
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to