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

Cannot compile examples with apt package #47

Closed
RaulPPelaez opened this issue Aug 2, 2018 · 3 comments
Closed

Cannot compile examples with apt package #47

RaulPPelaez opened this issue Aug 2, 2018 · 3 comments

Comments

@RaulPPelaez
Copy link

RaulPPelaez commented Aug 2, 2018

Following the guide I tried to compile TriangleExample.cpp. But I get these errors:

magnum-examples/src/triangle/TriangleExample.cpp:65:24: error: no matching function for call to ‘Magnum::GL::Buffer::setData(const Magnum::Examples::TriangleExample::TriangleExample(const Magnum::Platform::Sdl2Application::Arguments&)::TriangleVertex [3])’
     buffer.setData(data);

magnum-examples/src/triangle/TriangleExample.cpp:70:13: error: ‘Color3’ is not a member of ‘Magnum::Shaders::VertexColor2D {aka Magnum::Shaders::VertexColor<2u>}’
             Shaders::VertexColor2D::Color3{});

Maybe it is a version mismatch problem, but I dont see in the docs any mention to these changes.

BTW magnum-examples-dev package is not present in the Ubuntu package (I am trying to run it in Ubuntu 18.04)

@mosra
Copy link
Owner

mosra commented Aug 2, 2018

Hi! :)

The master branch of the examples (and also the docs, since these are currently based on master) depends on master branch of magnum, this particular error is related to this feature that's not available in any stable version yet. Depending on what apt package you used (I think the stable 2018.04 version from the PPA?), you might want to do one of these things:

  • keep using the stable 2018.04 version and check out the v2018.04 tag of examples to have code that's compatible with it
  • or build your own *.deb packages from the master branch. It's just two commands, but note you need to do that for all projects (corrade, magnum, magnum-plugins, ...). Detailed guide is in the docs.

@RaulPPelaez
Copy link
Author

Thanks for the instant answer!
Yes, the version is 2018.04.
I checkout'ed the v2018.04 branch in the examples repo and it now compiles without issue as you predicted.
Thanks again!

@mosra
Copy link
Owner

mosra commented Aug 2, 2018

You're welcome, have fun! :)

By the way, I'm planning to release 2018.08 with a lot of new features hopefully by the end of this month, subscribe to mosra/magnum#265 if you want to get notified when you can upgrade.

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

No branches or pull requests

2 participants