pothosware / PothosFlow

GUI frontend and designer tool for the Pothos framework
https://github.com/pothosware/PothosFlowi/wiki
Boost Software License 1.0
71 stars 27 forks source link

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

Closed eduardosm closed 4 years ago

eduardosm commented 4 years ago

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.

guruofquality commented 4 years ago

https://github.com/pothosware/PothosCore/pull/203