I need to use the printing methods from a third-party library. The
problem is those methods use std::cout but the use of std::ostream
methods seems to be disabled in latest versions of LLVM.
I need to use the printing methods from a third-party library. The
problem is those methods use std::cout but the use of std::ostream
methods seems to be disabled in latest versions of LLVM.
> I need to use the printing methods from a third-party library. The
> problem is those methods use std::cout but the use of std::ostream
> methods seems to be disabled in latest versions of LLVM.
>
> I'm aware of raw_os_ostream
> (http://llvm.org/doxygen/classllvm_1_1raw__os__ostream.html) which
> takes a std::ostream as input. E.g., I could do something like:
>
> #include "llvm/Support/raw_os_ostream.h"
> #include "llvm/Support/raw_ostream.h"
>
> raw_os_ostream * rout = new raw_os_ostream(std::cout); // 1
> // From now on, use rout rather than std::cout // 2
>
> The problem is that I get the error just with line 1 alone:
>
> undefined symbol: _ZTVN4llvm14raw_os_ostreamE