I am trying to create a shader within an MFC application.I am using Microsoft Visual C++ and WinXP. I have included the glew.h file and everything seems to work fine until I try to execute my application and it gives me a Microsoft Error. When I go into the debug it says that CXX0017:Error: Symbol “this” was not found. I found out that as soon as I try
GLhandleARB v = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB);
Microsoft gives me an error. Strange thing is though that I first tried the whole code in a “normal” OpenGL program (without MFC) and it was working perfectly. And now I am trying to integrate that program into my MFC application where all other OpenGL seems to work fine. But as soon as I create a shader object or refer to it, Microsoft gives me an error.
@L.B: Did you check to see if glewInit() failed?
You probably need to correct your project setup to make MFC code work with GLEW. It’s not clear if you have a compile, link or runtime error. If it’s a linking error make sure you are linking with the glew library.
Hi! Thank you, yes it was a problem with GlewInit().
And to knackered…I was not aware that it was a problem with my setup and that is why I thought that there was maybe something going on with my OpenGLSL. Yes I am a beginner and I did not mean to “upset” anyone by writing to the slightly inappropriate forum…maybe get some sleep?