Jump to content
  • Advertisement
Sign in to follow this  
yahastu

Glew linker errors

This topic is 2926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using MSVC 2008. I can compile and run projects using Glut without issue. Now I am trying to include Glew. This is what I have done:

1) Downloaded the latest version of Glew from
http://glew.sourceforge.net/install.html

2) Installed glew files into the following (recommended) directories:

C:\Windows\System32\glew32.dll
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\glew32.lib
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\lib\glew32s.lib
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\glew.h
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\glexw.h
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\GL\wglew.h

3) Added the following as Additional Dependencies under Linker Input,
opengl32.lib glu32.lib glut32.lib glew32.lib glew32s.lib

4) #include <GL/glew.h> before glut

When I compile, it still says:

1>Compiling...
1>main.cpp
1>Note: including lib: glut32.lib
1>Linking...
1>main.obj : error LNK2001: unresolved external symbol __imp__glewInit
1>main.obj : error LNK2001: unresolved external symbol __imp__glewGetString
1>main.obj : error LNK2001: unresolved external symbol __imp__glewGetErrorString

So...why aren't the libraries getting linked in?

Share this post


Link to post
Share on other sites
Advertisement
Are you sure you're supposed to include glew32 and glew32s at the same time? I think one is for static and the other is for dynamic linking, I think you have to pick whether you want static or dynamic linking and go with that lib only.

I don't know if doubly including those would cause your error, but it seems incorrect.

Try just glew32.lib, with no preprocessor commands (those are only needed if you include glew.c in your project from my understanding).

Share this post


Link to post
Share on other sites
Yeah I didn't think the preprocessor definitions were necessary. If I remove glew32s from the list it doesn't make a difference.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!