Boost and Size

This is a discussion on Boost and Size within the C++ Programming forums, part of the General Programming Boards category; I installed Boost (in order to compile a different program), or several parts of it, I don't remember, and I ...

  1. #1
    Amazingly beautiful user.
    Join Date
    Jul 2005
    Location
    If you knew I'd have to kill you
    Posts
    254

    Boost and Size

    I installed Boost (in order to compile a different program), or several parts of it, I don't remember, and I remember the download being like 30 or more megabytes. If I use Boost in my program, do I only distribute sections of Boost, or am I left with a huge dependency?
    Programming Your Mom. http://www.dandongs.com/

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,046
    I think that Boost is statically linked, so you wouldn't have any dependencies at all. Your executable would just increase in size by a small amount. Not very much. I compiled source-highlight (which uses Boost::Regex), and the executable was less than 1.5 MB. Plus source-highlight is a pretty complicated program.

    BTW, Boost, when compiled, takes up more like 300 MB of disk space. If you build everything.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,318
    Most boost libraries can be used without building or linking to boost. You just #include the header and it is used in your program. So not only do you not have to distribute anything, but your exe size won't be affected much.

  4. #4
    Amazingly beautiful user.
    Join Date
    Jul 2005
    Location
    If you knew I'd have to kill you
    Posts
    254
    Sweet. Thanks guys.
    Programming Your Mom. http://www.dandongs.com/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Boost Serialization unordered_multimap
    By idleman in forum C++ Programming
    Replies: 1
    Last Post: 05-06-2009, 11:14 AM
  2. Please check my C++
    By csonx_p in forum C++ Programming
    Replies: 263
    Last Post: 07-24-2008, 09:20 AM
  3. Boost Serialization: shared_ptr
    By KessiMC in forum C++ Programming
    Replies: 0
    Last Post: 12-26-2007, 07:17 PM
  4. Why does boost jam build repeating libraries?
    By indigo0086 in forum Tech Board
    Replies: 0
    Last Post: 05-30-2007, 06:35 AM
  5. C++ FTP class won't work
    By lord mazdak in forum C++ Programming
    Replies: 8
    Last Post: 12-18-2005, 06:57 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21