tags:

views:

33

answers:

1

I'm not very sure about this and I can't seem to find a complete answer. Some of boost's libraries need to be compiled (thread for example, as well as date time for some uses) - obviously one needs to compile them separately on each platform.

What I am interested in is if the hpp files can be shared between platforms. I'm ultimately seeking a directory structure like this:

boost\   
  include\ 
     ...  
  libs\
    nix\
      ...
    win\
      ...

So, can I:

  • use the same thread.hpp include in my linux version and my windows version? (thread.hpp needs a compiled lib)
  • use the same shared_ptr.hpp include between platforms? (shared_ptr.hpp does not need a compiled lib)

Thanks.

+1  A: 

Yes, of course in both cases. The .hpp don't change between platforms (maybe with some preprocessing boost has some differences, but nothing you have to care about).

Tristram Gräbener
Thanks. I was under the impression that some extra headers are generated during compiling, but having just compiled some of the libs again that doesn't seem the case. I posted a silly question.
laura
The compilation can't generate any header (excepted if you have a code generation system like moc in Qt). Nothing to worry there.
Tristram Gräbener