|
-
June 30th, 1999, 12:47 PM
#1
Static vs. Dynamic linking w/ MFC
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?
cheers,
-Matt
-
June 30th, 1999, 12:56 PM
#2
Re: Static vs. Dynamic linking w/ MFC
why link it staticly? just makes bigger code. do you have other reasons it needs to be staticly linked?
miked
-
June 30th, 1999, 03:48 PM
#3
Re: Static vs. Dynamic linking w/ 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.
Regards,
Paul McKenzie
-
June 30th, 1999, 05:19 PM
#4
Re: Static vs. Dynamic linking w/ MFC
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.
cheers,
-Matt
-
June 30th, 1999, 05:27 PM
#5
Re: Static vs. Dynamic linking w/ MFC
The only sane move on your part. Read my post. It sounds almost exactly like yours.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|