Discuss mfc vs non mfc? in the C Programming forum on Dev Shed. mfc vs non mfc? C programming forum discussing all C derivatives, including C#, C++, Object-C, and even plain old vanilla C. These languages are low level languages, and used on projects such as device drivers, compilers, and even whole computer operating systems.
The ASP Free website provides in-depth information on the latest developer tools available from Microsoft. Our cadre of writers, highly experienced industry experts, reveals the best ways to use established technologies as well as new and emerging technologies. Our coverage of Microsoft's development and administration technologies is among the most respected in the IT industry today.
ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month! Download and Activate to enter!
Intel® Graphics Performance Analyzers is a powerful tool suite for analyzing and optimizing your games, media, and graphics-intensive applications. Used by some of the best developers on the planet, Intel GPA lets you maximize your app’s performance.
Posts: 5,319
Time spent in forums: 2 Weeks 2 Days 22 h 4 m 31 sec
Reputation Power: 212
Dunno for sure, but I suspect that if you choose to statically link your libraries you can do pretty much as you like. MFC is a set of classes to simplify your Windows programming (that is arguable, but I think it is the intention). The main reason to statically link your executable (I think the same works for a DLL object) is to be able to run on machines that lack the needed DLLs. Otherwise you have to create a distribution that is smart enough to only install the needed DLLs. You can sometimes get away with having all the needed DLLs in the same directory as the executable. Generally, though, statically linking your exe/dll will also wind up with much smaller distribution because the compiler is ususally smart enough to only copy actually used DLL functionality into your program.
It is not that old programmers are any smarter or code better, it is just that they have made the same stupid mistake so many times that it is second nature to fix it.
--Me, I just made it up
The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man.
--George Bernard Shaw
Location: Woodland Hills, Los Angeles County, California, USA
Posts: 8,978
Time spent in forums: 1 Month 2 Weeks 6 Days 22 h 14 m 39 sec
Reputation Power: 3561
MFC projects require an MFC dll. MFC42.dll comes installed with most your Windows Installs, so you don't have to distribute it necessarily. The thing to be careful about is if you release a debug build instead of a release build. A debug build uses MFC42d.dll, which is installed only if you install VC++. A release build links to MFC42.dll which is installed by default on computers >= Windows NT 4.0, Win 98. The problem is that there are actually a few versions of this DLL floating around and it depends on a few other DLLs such as MSVCRT.dll, KERNEL32.dll and USER32.dll, all of which have newer versions too. If you don't use newer MFC functions, then you can count on your code working elsewhere too. However, if you use a newer MFC function, you might get an "Ordinal could not be located in MFC42.dll" message, if the DLL on the target machine is older that the one on which you compiled the EXE on and doesn't have the newer MFC function in it.
__________________ Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne Diary of a first time dog owner <-- my cousin's blog
Posts: 118
Time spent in forums: < 1 sec
Reputation Power: 10
Hmmm, I've dealt with this before. At one point I could have sworn checking the "Release" box in Batch Build options, yet it suck my executable in the Debug folder.