#12387 closed Bugs (wontfix)
automatic lib link
Reported by: | Owned by: | Andrey Semashev | |
---|---|---|---|
Milestone: | To Be Determined | Component: | log |
Version: | Boost 1.61.0 | Severity: | Problem |
Keywords: | log, lib, linckage, X | Cc: |
Description
Hi, When I include a header of a class which uses boost::log library after the line "#define X 0" the compilation of this module freezes! (never ending)
I use Visual Studio 2015 c++ (ansi-c++ and boost).
the lines I included were: #include <boost/log/trivial.hpp> #include <boost/log/sources/severity_logger.hpp> #include <boost/log/sources/record_ostream.hpp>
Thanks, Boaz.
Change History (7)
comment:1 by , 6 years ago
comment:3 by , 6 years ago
That makes compilation to fail because X
is used as a template parameter in boost::shared_ptr
implementation. No compiler hang.
comment:4 by , 6 years ago
You are right... defining X just gave a rightful error, the hang happened when I have put before the includes: #define X 0 #define Y 1
this happened even in the compilation before the link
comment:6 by , 6 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
With two defines the compiler outputs errors and then hangs.
I'm sorry, but I don't think I will be able to work around it in the library, especially given that the test code is not supposed to compile in the first place. I suggest you report this to Microsoft so that they fix the compiler hang.
comment:7 by , 6 years ago
Thanks for looking into it. BTW I checked on my mac as well and the compiler doesn't hang, so I agree it's probably MS issue.
I can't reproduce this with the latest develop branch. My MSVC version is 19.00.24210 and the test code compiles and links fine:
The command line is:
If you can reproduce this with the develop branch from git then please provide the source code and compiler command line to reproduce. Also please provide the full compiler version.
Lastly, I suggest you report this to Microsoft as hanging compiler is certainly a compiler bug.