uuu777
uuu777

Reputation: 901

boost without libraries

I would like to start using boost in an embedded environment. I can live without boost libraries that require compilation for quite sometime. I suppose just moving boost directory into appropriate place in our code base will do the trick

  1. Am I right about it or it is more involved than that?
  2. How to get rid of header files for the libraries that are not being used?
  3. Are there any gcc version dependencies in boost libraries. E.g. can use gcc-4.1.1 with the latest?

Upvotes: 1

Views: 1495

Answers (2)

Ray
Ray

Reputation: 930

I have not tried it myself, but if you compile Boost with a directory prefix, then I suppose you could move the directory later. I can't see a big problem with that or at least one that can't be fixed quickly.

As for getting rid of header files for libraries that aren't use, look into the bcp utility for the version with which you are using:

http://www.boost.org/doc/libs/1_49_0/tools/bcp/doc/html/index.html

It is "a tool for extracting subsets of Boost" -- exactly what you are looking for.

As for your last question, I think it depends on what version of Boost you are using. I've never had a problem with gcc dependencies...it seems their requirements are fairly liberal. I don't think you need to be worried too much about it unless you plan to use a version of gcc that is "much" older (than the Boost you plan to use). I would guess 'old' here is old enough that you don't need to worry -- any number that I would say would be merely a guess...

Hope this helps!

Upvotes: 1

Edward Strange
Edward Strange

Reputation: 40859

Am I right about it or it is more involved than that?

That will do it.

How to get rid of header files for the libraries that are not being used?

Why bother? They're not going to be compiled into the program. When you deploy your distribution won't be any different whether you remove them or not.

Are there any gcc version dependencies in boost libraries. E.g. can use gcc-4.1.1 with the latest?

vOv - That's a very old version. Boost takes things a lot further than most, more that I think they should most of the time, trying to make sure it works with old and/or broken compilers. You're really pushing it though.

Upvotes: 4

Related Questions