MDI and OpenGL

I write some codes based on MDI with OpenGL,after compiling which says"error LNK2001: unresolved external symbol __imp__glViewport@16",and wglCreateContext,wglMakeCurrent have the same problems.I don’t know how to solve the problem.Please help me!

You need to link OpenGl32.lib glu32.lib

Thank you!I will try!

I have already added “gl.h” and “glu.h” to it.But it still has the same problem.

No,the libs are different with header.You should link the libs when you compile the c++ files.In VC6 ,you can press “alt+f7” to activate the project setting and in the “link” tab,add the glu32.lib and opengl32.lib ,glaux.lib “object/libary modules” field.