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

undefined reference to `operator<<(std::ostream&, gl::GLenum const&)' #178

Closed
damien-lloyd opened this issue May 27, 2016 · 13 comments
Closed

Comments

@damien-lloyd
Copy link

I'm getting these two linker errors under Ubuntu 16.04 64-bit:

  • undefined reference to `operator<<(std::ostream&, gl::GLenum const&)'
  • undefined reference to `operator+(gl::GLenum const&, unsigned int)'

Previously, under Ubuntu 15.10 64-bit I didn't get none of these linker error messages and I was using glbinding for my projects. In Ubuntu 15.10 I compiled glbinding myself using cmake. Now, for Ubuntu 16.04 I've used the supplied PPA and installed glbinding that way.

What's going on. How do I resolve these two linker errors? Is there anything I can do to help resolve them if it's a problem on your side?

Regards,

@scheibel
Copy link
Member

We actually didn't test glbinding on Ubuntu 16.04 by ourselves. Thanks for reporting, we will investigate this issue.
I suppose we missed some code units to adhere to the argument dependend lookup (koenig lookup).

@damien-lloyd
Copy link
Author

In the meantime I will add your PPA to my list of repositories on Ubuntu. When an update is released which fixes these issues then I'm happy to install glbindings again. At the moment, I can't work on my projects since they rely on glbindings.

@scheibel
Copy link
Member

From your text I take our package from the PPA is working but a local compile / link on your system doesn't work?
Do you use a special compiler?

@sbusch42
Copy link
Member

I think it's the other way around, he's using the package from the PPA

@damien-lloyd
Copy link
Author

Yeh, I'm using the package from your PPA. That package is the one causing the linker errors. It may compile fine, but tthere may be functions that haven't been given the proper implementations.

@scheibel
Copy link
Member

scheibel commented Jun 1, 2016

We tried to reproduce your linker error on our machines.

We used a fresh install of Ubuntu 16.04 with the default compiler and installed glbinding from our PPA.
After that, we set up a local copy of globjects (https://github.com/cginternals/globjects) and added the use of the two signatures from your bug report. Everything compiles and links as expected.

Do you have a compiling code snippet or file that we can use to reproduce this error?
Does this error occur when you use a manual build of glbinding instead of an install from the PPA?

@damien-lloyd
Copy link
Author

I don't have globjects installed: is that a dependency I have to install? I'm using GCC 5.3 with the multilib library also installed. The thing is I can't give a compiling code snippet because I have used your library in my own library which is in itself linked to another executable. On Ubuntu 15.10 when I used glbinding 1.1 the library and executable worked just fine, but now I think something's changed. What is globjects if I may ask? :-)

@scheibel
Copy link
Member

scheibel commented Jun 1, 2016

No, globjects is an "example project" we used to test the linking of glbinding instead of your project (which, at the moment, we don't have access to).

@sbusch42
Copy link
Member

sbusch42 commented Jun 1, 2016

globjects is an object-oriented wrapper for OpenGL, based on glbinding. You don't need it, we just used that as a test to compile some project against glbinding.

In order to debug this any further, we really need an example code from you that demonstrates the problem. Make a small test case that does not include your whole project and see if you can reproduce the error within that small test project (in that process maybe you even find out that some combination with your other dependencies causes the problem).

Otherwise we can only say: it works on our machines and we can't reproduce the bug.

@damien-lloyd
Copy link
Author

I'm currently trying to use your library under the Eclipse IDE; I realised that this IDE is currently experiencing major issues under Ubuntu 16.04, because if I use another IDE like Qt Creator then your library compiles and links fine. It's probably because I'm using settings that were from Ubuntu 15.10 (when I compiled your library on my own). Unfortunately Eclipse IDE is preventing me from changing the build settings.

May I ask which IDE you are using on Ubuntu 16.04 to test glbinding?

@scheibel
Copy link
Member

scheibel commented Jun 1, 2016

We used standard make files without any IDE. But usually I work with Qt Creator which uses the CodeBlocks CMake Generator. Our tested IDEs are Qt Creator, Xcode and MSVC. For others like Eclipse we cannot make any statement about compatibility or issues.

@damien-lloyd
Copy link
Author

Okay, would it be possible to build glbinding under Debian stable/testing? What are the dependencies I'd have to resolve for that to happen?

@damien-lloyd
Copy link
Author

I resolved the issue by reverting from Ubuntu 16.04 to 14.04 and from glbinding2.0 to glbinding1.0. Everything works fine now. It's a huge rollback, but both Ubuntu 16.04 and glbinding2.0 contain elements which are preventing me from using my library. It might be a valid option to fork glbinding1.0 since the changes you've committed were not at all efficient.

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

3 participants