On 11/13/2015 2:14 PM, Richard Thiebaud via cmake-developers wrote:
When building a DLL with MSVC, CMAKE 3.4 can now auto-create a .def file
for all functions in the DLL, but global variables or static class
variables are not included in the .def file. Could the .def file be
created with def's for the variables as well as the functions?
See my blog on the topic:
http://www.kitware.com/blog/home/post/939

Short answer is no, it is not possible. The def file has all of that stuff. The problem is the calling code needs to know. That is stuff linking to the dll needs to know at compile time if the global variable is in a dll or not.

-Bill

--

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-developers

Reply via email to