Results 1 to 7 of 7

Thread: Do MFC programs only work on Computers with VS 6?

  1. #1
    ChimpFace9000
    Guest
    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.

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    You have three options regarding MFC usage in your project. (You can hit Alt+F7 to open a dialog where you can choose)
    1. 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).
    2. 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.
    3. Do not use MFC. WOO!

    Conclusion: MFC suckass, Win32 API kickass!

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    As an alternative, you can also use WTL -- the Windows Template Library. This is for VC++6 only, and comes with the Platform SDK.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Lively Member
    Join Date
    May 2000
    Posts
    123
    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??

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    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:

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    That's weird

    Also there's a technical article on MSDN about the TINYCRT library; well nice
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width