Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gotta #include <memory> and <functional> #2

Open
dllu opened this issue Jun 12, 2019 · 1 comment
Open

Gotta #include <memory> and <functional> #2

dllu opened this issue Jun 12, 2019 · 1 comment

Comments

@dllu
Copy link

dllu commented Jun 12, 2019

The code presently fails to compile with g++ 8.3.0 because it uses, for exmaple, std::shared_ptr from #include <memory> and std::function from #include <functional> but does not include either of the two.

For example, here is the first error message:

In file included from /home/dllu/proj/apolloscape-sfm/src/shader.cpp:9:
/home/dllu/proj/apolloscape-sfm/include/cv_gl/shader.h:49:55: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
 std::ostream& operator<<(std::ostream &os, const std::shared_ptr<Shader>& shader);
                                                       ^~~~~~~~~~
/home/dllu/proj/apolloscape-sfm/include/cv_gl/shader.h:49:50: note: ‘std::shared_ptr’ is defined in header ‘<memory>’; did you forget to ‘#include <memory>’?

It seems we need to add #include <memory> at the top of shader.h and #include <functional> at the top of gl_window.h.

@bexcite
Copy link
Owner

bexcite commented Jun 13, 2019

Thanks for catching this, my "magic machine" still works:) I've added this two deps but haven't tested it for g++ 8.3.0. Definitely, there are some hidden dependencies problem that didn't pop up on my Mac OS Clang setup. Hope you've been able to compile it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants