g++: Cannot find -lGLU

Hello everyone! Recently I started using OpenSUSE Leap 42.1 and now I am trying to compile OpenCASCADE on it. During make procedure, I get this error:

/usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lGLU

I found somewhere that GLU is a part of Mesa/Mesa-devel so I installed both packages using zypper.
In /usr/lib64 directory I have: libGLU.so.1.3.1 and libGLU.so.1 (which is a link to libGLU.so.1.3.1), but still the linking step is failing.
Any ideas? Thank in advance for any help.

In your Makefile or what ever your using add try --as-needed or use pkg-config (is pkg-config installed?) command (so it looks in the *.pc file) to add the libs. The pc file is in /usr/lib64/pkgconfig/

If still having issues, probably the section of your build file etc may glean more info, plus a bit more of the error output (Use http://paste.opensuse.org).

Yes, I am using cmake to generate the makefiles. I put the flag --as-needed, but it doesn’t help. Linker is not able to find this libGLU.so.1. I compiled successfully this application on OpenSUSE 13.2, even without flag --as-needed, so I left everything by default. How can I see the linker list, just to check is the libGLU.so.1 there?
Was I correct, is this library referred to Mesa/Mesa-develop? Or could it also be related to graphic driver?

Linker never links against versionned libraries. You need libGLU.so, without suffix. Normally these libraries are in -devel package, so probably Mesa-devel in your case.

Exactly what I am thinking, I need libGLU.so file (or symbolic link) in my lib64 directory. But I don’t know which package should provide me that.
I already installed Mesa, Mesa-devel, Mesa-libGL-devel, libGLU1 (there is no libGLU1-devel though), but nothing there. If I can not find the proper package, maybe I could create a sym-link named libGLU.so which points to libGLU.so.1.3.1, I don’t have any other idea right now.

It is in the glu-devel package!