Axis of rotation

I have to rotate a cube and it is rotating all right. But I wish to find it’s axis of rotation . What to do?

Didn’t completely understand what you mean, but if you’re rotating it, you give it the angles around the axises. You can make it yourself. Simply use an identity matrix and rotate the matrix (which, I found out for rotations, are only the axises) like glRotate would do. At the end, it should contain your 3 local axises of the object.
In fact, I’m doing it like that, I set up the matrix, and then I load it up to opengl. If it’s only one time for an object, it shouldn’t hurt performance too much.