How should I compile boost library in a small project?

Posted by Vincenzo on Stack Overflow See other posts from Stack Overflow or by Vincenzo
Published on 2010-05-26T11:32:54Z Indexed on 2010/05/26 11:41 UTC
Read the original article Hit count: 223

Filed under:
|

I have a small project where I need just part of boost library, boost::regex in particular. This is what I've done so far:

/include
  /boost
    /regex
    /math
    .. 189 dirs, files, etc.
/lib
  /boost-regex
    c_regex_traits.cpp
    cpp_regex_traits.cpp
    .. ~20 .cpp files
myprog.cpp

In my Makefile I compile all boost-regex .cpp files one by one, producing .obj files. Next, I'm building my project by means of compiling myprog.cpp together with all that .obj files from /lib/boost/regex.

The question is whether I'm doing everything correct? The size of my output file is rather big (~3.5Mb), while my code is extremely small (10 lines).

© Stack Overflow or respective owner

Related posts about c++

Related posts about boost