Linking error

When I compile and link my Win32 Application(demo.cpp) with VC++, the following message shows up.
But if I compile the same code in the file name “demo.c”, there is no such error. Why? How to work it out? Thank you

“Linking…
demo.obj : error LNK2001: unresolved external symbol __imp__wglDeleteContext@4
demo.obj : error LNK2001: unresolved external symbol __imp__wglCreateContext@4
demo.obj : error LNK2001: unresolved external symbol __imp__glOrtho@48”

Maybe because you forgot to add opengl32.lib to your C++ project?

yep, thank you so much

Originally posted by Deiussum:
Maybe because you forgot to add opengl32.lib to your C++ project?