[CMake] How can I compile and link modular code into a single DLL with MSVC?

Jason Heeris jason.heeris at gmail.com
Thu Jun 28 23:02:20 EDT 2018


On Thu, 28 Jun 2018 at 20:14, Jason Heeris <jason.heeris at gmail.com> wrote:
> So I went and tried this on the real project, and it seems like compiling
the static libs into a DLL doesn't give the same results as using the obj
files directly, as per my initial list of commands. Namely, some symbols
seem to not be getting exported, and some flags are mismatched between
compiler and linker.

Finally got to the bottom of this. The linking was fine, but some
compilation flags were affecting the binary interface. I've made some hacks
in the code to work around this just to verify that it *can* work, and
hopefully solving my issues in the other thread (controlling compiler
flags) will give me a longer term solution.

Thanks for your help.

- Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180629/487f0bf5/attachment.html>


More information about the CMake mailing list