1

No sure why, but every time I run my OpenGL program on my home computer a message box pops up at runtime stating "The procedure entry point glewInit could not be located int he dynamic link library glew32.dll". Now I am almost certain I installed everything properly, I followed the instructions from the glew webpage and I can even get the program to run on my work computer. I've tried searching online for solutions to this error but most people with this error have it because they forgot to include the dll file in the linker dependencies (Which is not my issue.) Does anyone have any insight on how to correct or circumvent this error? My current operating system is Windows 7 Professional edition (2009).

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Maybe you have an old version of glew on your system but are using a function that is in a newer version? – Lyubomir Vasilev Oct 01 '12 at 05:18
  • GlewInit is in all versions of glew. Also I made sure to run the diagnostic tools that came with the latest version. GlewInit is definitely supported. – Benjamin Danger Johnson Oct 01 '12 at 06:02
  • Check that your program uses the correct glew32.dll. Maybe you have multiple versions installed? (Remember that dlls have to be found at runtime, they do not have anything to do with linker settings: run where glew32.dll to check, also the Dependency Walker is a good help) – ta55e Oct 01 '12 at 07:30
  • I tried using the "where glew32.dll" command but it was found successfully in my System32 folder. I haven't tried Dependency Walker yet. – Benjamin Danger Johnson Oct 02 '12 at 02:09
  • I tried the dependency walker but it was no help. It told me every dll was missing, even on programs that function properly. Not to mention it's GUI is less than user friendly. – Benjamin Danger Johnson Oct 21 '12 at 01:39

2 Answers2

4

Quick solution of last resort is to look for an other glew32.dll on your system shipped with an other application (you can easily find such an application over the web).

The problem appears when mixing headers/libs versions. It will compile, but while the older versions declares glewInit as entry point, the newer ones (1.9 for sure) declares _glewInit@0 in release configuration.

Confusing your last compilation output with an old debug exe can also produce such a situation.

Flint
  • 1,651
  • 1
  • 19
  • 29
  • It seems to be true. My app runs fine in Debug mode, but I have the same problem in Release. – wip Jan 10 '13 at 08:23
1

Not sure what the problem was, but I redownloaded glew, I think I might have been missing a header file (not glew.h) and that forced it to blow up with a less than helpful error message.