Hi all. I'm on Windows, and I need a DLL composed of multiple static libraries, any of which can define dllexport functions not otherwise referenced in the DLL. The problem is that the Visual Studio linker does not provide flags to link an entire static library (i.e. there is no equivalent to ld's --whole-archive). I tried /OPT:NOREF, it didn't help.
The only solution I can think of is to link all of the static library's object files instead of the library itself (I verified manually that this works). I cannot put source files into the DLL directly, because the DLL is C and the static lib(s) are Fortran. My question is thus: is there a way to retrieve the list of a target's object files from cmake? If there isn't any, I will resort to 'lib /list' and pre-build/post-build magic, but I'd prefer a simpler solution. Or if anyone happens to know a better way than linking all the object files, please share it. However, .def files are not an option. Thanks in advance. Petr -- 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
