Results 1 to 6 of 6

Thread: anyone know how to reduce a win32 c++ dll size?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    anyone know how to reduce a win32 c++ dll size?

    im building the dll in release mode and its 190kb+, i want to make it smaller though, any ideas how?

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: anyone know how to reduce a win32 c++ dll size?

    If you're using the STL, not much chance of that. You can try linking to the dynamic version of the runtimes. (It's a project setting, either general or linker.)
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: anyone know how to reduce a win32 c++ dll size?

    thanks mate, yep it uses STL string stuff and the linker thing, there is a tickbox saying

    'Link incrementally'

    thats in projects settings under the 'general' drop down section

    i cant find anything else to do witht he linker

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: anyone know how to reduce a win32 c++ dll size?

    "Project Options"->"C/C++"->"Code Generation"->"Runtime Library"
    Set to "Multi-Threaded Debug DLL" for debug config, "Multi-Threaded DLL" for release config.

    Yes, it's a weird place to put this. No wonder I constantly forget where it is.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,364

    Re: anyone know how to reduce a win32 c++ dll size?

    omg, corned bee, you are a absolute genius.

    its gone down to 36kb

    from 190kb LOL

  6. #6
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594

    Re: anyone know how to reduce a win32 c++ dll size?

    Note that the DLL in question comes with Windows XP if you're using VS.Net 2003 or 2002, with Windows 2000 if you're using VC++6, but with not with earlier versions, and not, I think, if you're using VS.Net 2005, which means that you'll have to distribute that DLL too for those who don't have it.

    The DLL is a few MB large, so it might or might not be worth it. Generally, MS spreads these DLLs with their service packs, but there's no guarantee that a particular version will be available on a given computer.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

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