Unresolved external character using GLEW, SDL, and OpenGL in VIsual studio 2010 express

I am using this OpenGL tutorial. I used SDL to create my window, and now I need to use glew (see the "One More Thing" section at the bottom of the tutorial). But no matter what I bind, turn on, copy, or define, all I get is unresolved external character errors.

I have:

  • Associated my project with the GLEW Lib folder
  • Added include folder to my include path
  • I copied the include, bin, and lib files to the C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v7.0A \ files on the corresponding cards
  • copied glew32.dll and glew32mx.dll to the system32 folder
  • different files are included and defined (see screenshots 2)

Will I let the screenshots say that I forgot?

Screenshots:

should have gone here, but because of the new user rule, I cannot include them here. Here is the link

+7
source share
2 answers

I think you need to link to glew32sd.lib or glew32s.lib (depending on the debug or release configuration), since you defined GLEW_STATIC.

Here is a snippet from a precompiled header in the win32 glew application that we recently completed. It shows the libraries we linked to:

#pragma comment( lib, "OpenGL32.lib") #pragma comment( lib, "GLu32.lib") #pragma comment( lib, "freeglut_static.lib") #define GLEW_STATIC #if defined _DEBUG #pragma comment(lib, "glew32sd.lib") #else #pragma comment(lib, "glew32s.lib") #endif #include <GL\glew.h> #include <gl\GL.h> #include <gl\GLU.h> 

Note that we used glew32s.lib and glew32sd.lib (debugging equivalent), which I believe is the static lib for glew.

If you pointed the library correctly and included the folders, the only problem I can think of is that you might need the dll files that will be copied to the output folder for your project.

So, for example, if your project is built on c: \ MyProject \ Debug \ MyProject.exe, copy the dlls to c: \ MyProject \ Debug.

Hope this helps.

0
source

This may not solve your immediate problem, but it may help you evade another inbox later. I dont know. What I provide is just a recommendation from another resource for learning how to do what you asked for.

Now, I think your first link is broken, because it links to screenshots for me. I was going to check the textbook, but could not because of this.

Anyway, I use a book called OpenGL SuperBible 5th ed; which is very easy to digest.

It says that you donโ€™t know anything about 3D graphics, how to enable libraries, create a window for your system, etc. However, this is very detailed, without excessive study. I finished the book in two weeks (well, during the holiday, doing nothing).

I am in no way connected with the owner of the book, I really liked it, and it seems to me that you coped with it.

0
source

All Articles