Linking Windows DLL files from static libraries using CMake without hand-crafting unresolved symbol names?

I'm only answering to make it clear your feeling to not use static libraries is correct.

I'm only answering to make it clear your feeling to not use static libraries is correct. DLRdave said it already in the comments, your build system is being abused by LIB files. A LIB file is much like a real library, you only walk out with the things you ask for, not everything in the library.

If there's a gap in the Visual Studio 2008 tool set, it's that it doesn't support partial linking. The input into a partial link is a set of OBJ files and the output is a single OBJ file that contains all the code and data from the input OBJ files. The difference between an archive/library and a partial link is described for g++ in the answer to this question: g++ partial linking instead of archives?

, where the GNU linker (ld) does support partial linking. As for possible short term mitigation - personally, I would have tried to use scripting to dynamically build the DEF file at build time by using LIB /List or DUMPBIN /ARCHIVEMEMBERS to get the obj files and LIB /DEF to generate the DEF file from that list. Or, as I assume _declspec(dllexport) is being used, you could have also used DUMPBIN /DIRECTIVES, looked for /EXPORT and built the DEF file yourself.

I agree with most of that. Now that I have worked with CMake a bit more, it might be possible to create a special wrapper around calls to add_library(... STATIC ...) to implement such a DEF generation mechanism. I'll have to give that some more thought.

– bgoodr Aug 27 at 17:13.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions