
On 03/12/2010 12:40 PM, Barend Gehrels wrote:
Is it possible to use Boost.Log in header-only mode, assuming a simple use case without threads and separate DLLs?
No, the library has to be compiled anyway. However, if your application is a single .exe module, you can link statically with Boost.Log and other libraries.
OK, I must say that I'm not so happy with that. What is the reason for the need to compile? Logging is very useful, but to statically link only because of logging is in many cases not convenient.
You do link anyway, do you? :) What is the problem of adding a library to the linker command line?
Would it be possible (technically or otherwise) to adapt it to be header only, as a whole or just the core part?
Not right now. The library relies on process-scope singletons in several places. Also, the implementation itself is heavy enough. Another alternative I might suggest is to compile the library sources along with your project.