autolink include guard ?
I notice that when my tests build I get Linking to lib file: libboost_serialization-vc71-mt-gd-1_35.lib Linking to lib file: libboost_serialization-vc71-mt-gd-1_35.lib I was curious as to why I go two such messages. Looking at auto_link.hpp I see that there is no include guard no a #pragma once. Is there a reason for this? Robert Ramey
Robert Ramey wrote:
I notice that when my tests build I get
Linking to lib file: libboost_serialization-vc71-mt-gd-1_35.lib Linking to lib file: libboost_serialization-vc71-mt-gd-1_35.lib
I was curious as to why I go two such messages. Looking at auto_link.hpp I see that there is no include guard no a #pragma once. Is there a reason for this?
Yes, you can link to more than one library, so it does need to be capable of being included more than once (think about what happens if you are using serialisation, regex and filesystem in the same application). If you're seeing two messages then you must be including the header from more than one location (for the same library), which is potentially error prone? John.
participants (2)
-
John Maddock
-
Robert Ramey