1

I've started a empty project in Visual Studio 2010 and downloaded the latest versions of GLEW and GLFW. I believe I've got them correctly set up in the Project > Properties and I've written a test program to see if they work.

I can initialize GLFW properly via glfwInit() and I can open a window context no problem. However when I try to initialize GLEW via glewInit() I get a Entry Point Not Found error.

Entry Point Not Found
The procedure entry point _glewInit@0 could not be located in the dynamic link library D:\Blah\Debug\TestProg.exe

Strangely I don't have any trouble compiling the code. That is it compiles with no errors. It only displays the error message when I try to run the program.

Anyone know what to do?

genpfault
  • 51,148
  • 11
  • 85
  • 139
user2940530
  • 11
  • 1
  • 2
  • 1
    Side note: since you are just beginning to learn OpenGL, I suggest learning the modern OpenGL (instead of the old one in case you are learning the old one). [This tutorial/book](http://www.arcsynthesis.org/gltut/) is quite good. Also, it may not be a bad idea to start programming with portable tools instead of Windows-only ones. That way, if you plan on making a commercial application, you can easily sell it for all operating systems, or alternatively make free applications for everyone. – Shahbaz Oct 31 '13 at 14:22

1 Answers1

0

Looks like GLEW is complaining because it can not find it's DLL. Are you sure you have it located where the executable can find it?

See: http://glew.sourceforge.net/install.html

This compiles perfectly fine as it is a DLL error, and not say a static library issue.

ssell
  • 6,429
  • 2
  • 34
  • 49
  • I did as the install guide said. Copy the glew32.dll file into my system32 folder. Do I need to specify it anywhere in my code? EDIT: So I copied the glew32.dll file into the same directory as the .exe and the program runs fine. Why is it looking in the output directory? I thought it needed to find it in system32\ ? – user2940530 Oct 31 '13 at 14:21
  • It depends on the project settings. By default it looks for it in the spot where the program is being run. You can modify this, see http://stackoverflow.com/a/2119707/735425. Also, your application may not of had system32 read access for whatever reason. – ssell Oct 31 '13 at 14:36