Hi, I have a doc/view app that I've always dynamically linked with MFC. I'm thinking about linking it statically, but I tried that and it compiles and links, but will not run. What are the 'gotchas' for static linking MFC?
This is not totally true if you are going to distribute the application to a large audience of people who may or may not have the necessary DLL's. A statically linked EXE with MFC is much smaller than a dynamically linked version *plus* all of the DLL's that are needed to get the application working. I statically linked an MFC application and it was less than 300K.
To clarify, I need to link statically with MFC because I'm linking with other libraries that depend on libc.lib. libc.lib clashes with msvcrt.lib, and if I ignore msvcrt.lib, I will be missing a couple of symbols I need to link. Linking statically *should* solve this problem. I also want to link statically, because I've had problems with different users that have different versions of the MFC dlls on their computers, and my app will work on some, and not on others. Linking statically will solve that problem.
Bookmarks