CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 1999
    Posts
    20

    Compiler Optimizations

    Help Me!
    Why are all my MfcAppWizard generated Dialog Apps
    6.5 megs! In release mode they are only 5.5 megs!
    How come in VB they are only 100K?!? Is there any
    way to fix this?
    [email protected]

    "I do not know what weapons they will use in
    World War III, but in World War IV they will
    use sticks and stones" --Einstein

  2. #2
    Join Date
    May 1999
    Posts
    128

    Re: Compiler Optimizations

    Sounds like you're using static linkage. Look at Project Settings, General Tab, change it so it reads "Use MFC in a shared DLL". You will get a much smaller exe size but your app will now need several DLL's (MFC42.DLL and MSVCRT.DLL are the main ones) to be able to run.



  3. #3
    Join Date
    Jul 1999
    Posts
    20

    Re: Compiler Optimizations

    I am using shared DLL. The Release/Debug folder
    has one file in it called MyProject.pch. This
    is the largest file. Do I need this file for the
    .exe to run?
    --GameDeveloper

    "I do not know what weapons they will use in
    World War III, but in World War IV they will
    use sticks and stones" --Einstein

  4. #4
    Join Date
    May 1999
    Location
    West Sussex, England
    Posts
    1,939

    Re: Compiler Optimizations

    The .pch file is the pre-compiled header file used by vc++ to speed the compilation process. It is not used by the exe when running.

    What difference in size do you get between the debug and release versions of your code? It could be your release version has alot of the debug settings, and will have lots of extra info added to the .exe file because of this.

    HTH


    Roger Allen
    Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
    Please remember to rate useful answers. It lets us know when a question has been answered.

  5. #5
    Join Date
    Jul 1999
    Posts
    20

    Re: Compiler Optimizations

    Thanks! Now the stuff is small! But.. I still don't know which files in the
    debug/release folder I need to put on a disk for the program to run. The DLLs
    are fine (I know which ones to put) but I need to know which files in the debug/release folder are needed. ;o)
    --GameDeveloper

    "I do not know what weapons they will use in
    World War III, but in World War IV they will
    use sticks and stones" --Einstein

  6. #6
    Join Date
    May 1999
    Location
    West Sussex, England
    Posts
    1,939

    Re: Compiler Optimizations

    I think you just need the .exe file. If you know which DLL's need to be installed with your application. It's definately worth trying a trial installation on a local computer which doesn't have VC++ installed on it. This should let you know about any files you may be missing.
    Don't foget to add the .txt tip file if you are using a tip of the day...

    HTH


    Roger Allen
    Please use meaningful question titles - "Help me" does not let me know whether I can help with your question, and I am unlikely to bother reading it.
    Please remember to rate useful answers. It lets us know when a question has been answered.

  7. #7
    Join Date
    Aug 1999
    Posts
    2

    Re: Compiler Optimizations

    turn off the debugging info switch in your compiler and linker settings.

    Hope this helps,
    7ig3r
    [email protected]


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

Featured