Skip to main content
GameDev.net gamedev.net
🔒 Locked

Visual Studio Library linking problem

Started by kelicant Jul 3, 2012 at 1:41 PM 4 replies 12.4k views
Original Post
kelicant
kelicant
I've been going through tutorials for OpenGl for about 2 weeks now, I've gotten through all of them on 3 different websites. But now I'm trying to create an original project, and can't even get the project to work.

I start a new project in Visual Studio 2010. Win32 Console application, blank project. I add a main.cpp in the source folder.
Then I go to the projects properties, Linker>Input>Additional Dependencies and enter in opengl32.lib.

However my project is going to use glew, glfw, and glm. The way I understand linking the libraries is this:
Create a dependencies folder in my project directory (windows explorer)
Add the latest builds for glew, glfw, and glm in folder in directories by name (like a path of dependencies\glew\include)
Then go into the projects properties C C++>additional include directories and add
dependencies\glew\include
dependencies\glfw\include
dependencies\glm
Then go to Linker>Additional Library Directories and add
dependencies\glew\include
dependencies\glfw\lib-mscv100
Then go to Linker>Input>Additional Dependencies and add
glew32.lib
glfw.lib

And my code starts with


#include
#include

#include

#include

#include
using namespace glm;

However it says "fatal error C1083: Cannot open include file: 'GL/glew.h': No such file or directory".

Can anyone help me out? I've been trying everything imaginable for about 6 hours now. I'm frustrated out of my mind. Thanks for any input in advance.
BitMaster
BitMaster
This is not a linker error, it's a compile error. You have not specified the include directory where GL/glew.h can be found.
kelicant
kelicant
How would I go about doing that? I thought I went through all the steps?
brx
brx
Project Properties->C/C++->General->"Additional Include Directories"
Enter the correct include path for the glew.h header and you should be good to go.
Zoomulator
Zoomulator

[font=arial, helvetica, sans-serif]Is there a GL\ folder in the [/font]

[background=rgb(250, 251, 252)]dependencies\glew\include where the glew.h file is?[/background]



Full path being dependencies\glew\include\GL\glew.h

kelicant
kelicant
Thanks for the help. The problem was there were 2 folders with the same name, it was in the wrong one.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.