Roger, Did you try to remove all the explicit template exports? I never had to do it and compiled many static and shared libraries on Windows. Of course VS is going to complain about exporting template classes but as long as you don't try to mix VS versions I think you can safely ingore those warnings.
Also, this block of code in a.h, b.h, etc.: #ifndef A_H #define A_H #include <string> #include "aexport.h" #ifdef a_BUILT_AS_STATIC # define a_EXPORT_TEMPLATE #else # ifndef a_EXPORT_TEMPLATE # ifdef a_EXPORTS /* We are building this library */ # define a_EXPORT_TEMPLATE # else /* We are using this library */ # define a_EXPORT_TEMPLATE extern # endif # endif # ifndef A_NO_EXPORT # define A_NO_EXPORT # endif #endif #ifdef _MSC_VER // Explicit template exports. #include <string> a_EXPORT_TEMPLATE template class a_EXPORT std::allocator<char>; a_EXPORT_TEMPLATE template struct a_EXPORT std::char_traits<char>; a_EXPORT_TEMPLATE template class a_EXPORT std::basic_string<char, std::char_traits<char>, std::allocator<char> >; #endif class a_EXPORT a { std::string val; public: a(); std::string const& getval() const; }; #endif // A_H seems redundant. I would remove it. Including aexport.h should be enough. Hope this helps. Guillaume On Thu, Jul 30, 2015 at 8:45 AM, Roger Leigh <rle...@codelibre.net> wrote: > ibraries which -- Guillaume Dumont ========================= dumont.guilla...@gmail.com
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake