Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Visual Studio Library linking problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Kelicant   Members   -  Reputation: 101

Like
0Likes
Like

Posted 03 July 2012 - 07:41 AM

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 <stdio.h>
#include <stdlib.h>

#include <GL/glew.h>

#include <GL/glfw.h>

#include <glm/glm.hpp>
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.

Sponsor:

#2 BitMaster   Members   -  Reputation: 1398

Like
0Likes
Like

Posted 03 July 2012 - 07:58 AM

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.

#3 Kelicant   Members   -  Reputation: 101

Like
0Likes
Like

Posted 03 July 2012 - 08:13 AM

How would I go about doing that? I thought I went through all the steps?

#4 brx   Members   -  Reputation: 438

Like
0Likes
Like

Posted 03 July 2012 - 08:25 AM

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.

#5 Zoomulator   Members   -  Reputation: 269

Like
0Likes
Like

Posted 03 July 2012 - 08:25 AM

Is there a GL\ folder in the

dependencies\glew\include where the glew.h file is?


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

Edited by Zoomulator, 03 July 2012 - 08:26 AM.


#6 Kelicant   Members   -  Reputation: 101

Like
0Likes
Like

Posted 03 July 2012 - 08:52 AM

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




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS