Skip to content

error compiling with gcc11 #2976

Closed
Closed
@chi86

Description

Compiling with gcc-11.2.0 reported:

In file included from ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.cpp:17:
ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.h:34:20: error: ‘std::shared_ptr’ has not been declared
34 | void Send(std::shared_ptr<std::vector> buffer);
| ^~~~~~~~~~
ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.h:34:30: error: expected ‘,’ or ‘...’ before ‘<’ token
34 | void Send(std::shared_ptr<std::vector> buffer);
| ^
ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.h:35:10: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
35 | std::shared_ptr<std::vector> Receive();
| ^~~~~~~~~~
ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.h:17:1: note: ‘std::shared_ptr’ is defined in header ‘’; did you forget to ‘#include ’?
16 | #include
+++ |+#include <memory>
17 |
...

by adding, as proposed in the error message "#include <memory>" at line 17 in "ADIOS2-2.7.1/source/adios2/toolkit/zmq/zmqpubsub/ZmqPubSub.h" fixed the issue.

Best
Chris

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions