pothosware/PothosFlow

Failed to compile with "error: cannot ‘dynamic_cast’" with latest poco

eduardosm opened this issue · 1 comments

Trying to build on Arch Linux with latest poco (1.1.0.1) will produce the following error:

PothosCore/flow/MessageWindow/LoggerChannel.cpp: In constructor ‘LoggerChannel::LoggerChannel(QObject*)’:
/home/eduardosm/aur-pkg/pothos-git/src/PothosCore/flow/MessageWindow/LoggerChannel.cpp:13:15: error: cannot ‘dynamic_cast’ ‘Poco::Logger::getChannel() const()’ (of type ‘using Ptr = class Poco::AutoPtr<Poco::Channel>’ {aka ‘class Poco::AutoPtr<Poco::Channel>’}) to type ‘class Poco::SplitterChannel*’ (source is not a pointer)
   13 |     _splitter(dynamic_cast<Poco::SplitterChannel *>(_logger.getChannel()))
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [flow/CMakeFiles/PothosFlow.dir/build.make:480: flow/CMakeFiles/PothosFlow.dir/MessageWindow/LoggerChannel.cpp.o] Error 1

Using the vendored poco builds fine. However, installing will override system's poco.