sigrokproject / pulseview

Read-only mirror of the official repo at git://sigrok.org/pulseview. Pull requests welcome. Please file bugreports at sigrok.org/bugzilla.
http://sigrok.org/wiki/PulseView
GNU General Public License v3.0
487 stars 157 forks source link

Include <memory> so we don't get error at compile time. #50

Closed pkasemir closed 2 years ago

pkasemir commented 2 years ago

shared_ptr requires <memory> and it fails to build mingw on my archlinux machine using gcc 12.2.0

Example build failure:

  In file included from /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.cpp:21:
  /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:130:14: error: 'shared_ptr' in namespace 'std' does not name a template type
    130 | typedef std::shared_ptr<pv::data::Segment> SharedPtrToSegment;
        |              ^~~~~~~~~~
  /home/paul/sigrok-util/cross-compile/mingw/build_release_64/pulseview/pv/data/segment.hpp:32:1: note: 'std::shared_ptr' is defined in header '<memory>'; did you forget to '#include <memory>'?
     31 | #include <QObject>
    +++ |+#include <memory>
     32 |
pkasemir commented 2 years ago

@abraxa could you take a look?

abraxa commented 2 years ago

Merged as 2802b9ec97992323dc797c1b2cd5f9213e3d6932, thanks!