CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 27

Threaded View

  1. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,633

    Re: Why is my release exe 32 kb with only 14 lines of code?

    Quote Originally Posted by Craisins View Post
    Debug is much bigger and release is around 32kb. What can be done to get VC2008 style cleanup?
    Nothing special, you know. You just spend a few years to learn C++, and magic comes ultimately.

    35.cpp here below is your 14 lines. Look what good /MD switch brings in.
    Code:
    D:\Temp\35>cl 35.cpp user32.lib
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    35.cpp
    Microsoft (R) Incremental Linker Version 8.00.50727.762
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    /out:35.exe
    35.obj
    user32.lib
    
    D:\Temp\35>dir
     Volume in drive D is WORK
     Volume Serial Number is 4067-668D
    
     Directory of D:\Temp\35
    
    02/09/2010  12:45 AM    <DIR>          .
    02/09/2010  12:45 AM    <DIR>          ..
    02/09/2010  12:45 AM               284 35.cpp
    02/09/2010  12:51 AM            45,056 35.exe
    02/09/2010  12:45 AM               382 35.exe.manifest
    02/09/2010  12:51 AM               803 35.obj
                   4 File(s)         46,525 bytes
                   2 Dir(s)  37,164,232,704 bytes free
    Code:
    D:\Temp\35>cl 35.cpp /MD user32.lib
    Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for 80x86
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    35.cpp
    Microsoft (R) Incremental Linker Version 8.00.50727.762
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    /out:35.exe
    35.obj
    user32.lib
    
    D:\Temp\35>dir
     Volume in drive D is WORK
     Volume Serial Number is 4067-668D
    
     Directory of D:\Temp\35
    
    02/09/2010  12:45 AM    <DIR>          .
    02/09/2010  12:45 AM    <DIR>          ..
    02/09/2010  12:45 AM               284 35.cpp
    02/09/2010  12:45 AM             5,632 35.exe
    02/09/2010  12:45 AM               382 35.exe.manifest
    02/09/2010  12:45 AM               950 35.obj
                   4 File(s)          7,248 bytes
                   2 Dir(s)  37,164,273,664 bytes free
    Only reason I switched to VC6 is because VC2008 required some computers to have MSVC90.dll as a runtime library and is very annoying to the end user to have to install that, so I chose VC6. I wish 2008 had a way to build exe as VC6 does however.
    Sure it will, by twelve years afraid though.
    Last edited by Igor Vartanov; February 8th, 2010 at 04:58 PM.
    Best regards,
    Igor

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