An MFC program will run on any computer that has the mfc dll's installed. And mainly only computers with VC++ on it, has em. I suggest you learn to program for real and learn the api.
Printable View
An MFC program will run on any computer that has the mfc dll's installed. And mainly only computers with VC++ on it, has em. I suggest you learn to program for real and learn the api.
You have three options regarding MFC usage in your project. (You can hit Alt+F7 to open a dialog where you can choose)
- Use MFC as a shared DLL. This requires that MFC42.DLL be present at the system directory (usually C:\Windows\System or C:\WinNT\System32).
- Use MFC as a statically-linked library. This doesn't require any external DLLs, but a simple "Hello, world!" program weighs around a full megabyte. :rolleyes:
- Do not use MFC. WOO!
Conclusion: MFC suckass, Win32 API kickass! :cool:
As an alternative, you can also use WTL -- the Windows Template Library. This is for VC++6 only, and comes with the Platform SDK.
using the statically linking library worked. thanks.
and also my program is alot more than a hello world and it still only is about 38KB compiled, so i guess you were wrong about that.
Chimpface considering that my class is called Programming Windows with MFC, i would think just using the API instead wouldn't make alot of sense, what do you think??
Well...we didn't know what your class was, we were merely suggesting the best way to go about things :)
And a quickie test of a release-mode program:
DLL - 50K
Static - 443K
No contest :rolleyes:
By the way... EXEs compiled in VC++ 6 are much bigger than VC++ 5 compiled EXEs, but you can add the option /OPT:NOWIN98 (VC++ 6 only) to make the EXE size closer to the size compiled with VC++ 5.
There was an article about this in some Microsoft page by Matt Pietrek (I think) but I lost the URL. :(
Code:#pragma comment(linker, "/OPT:NOWIN98")
// to pretend it's a change in the code :rolleyes:
That's weird :confused:
Also there's a technical article on MSDN about the TINYCRT library; well nice :)