2

so im trying to link the 32 bit GLFW.lib and I placed it on my desktop and did this: http://s1.postimg.org/40q6d5367/Untitled.png and made sure to include #include <GL/glfw.h> but it just gives me this everytime

Error   1   error C1083: Cannot open include file: 'GL/glfw.h': No such file or directory
user1895629
  • 147
  • 1
  • 1
  • 8

1 Answers1

2

There should be the include file that comes with the library itself, i.e. the gl/glfw.h (together with a bunch of other gl/gl...h files probably).

This file (these files) needs to be placed somewhere where the compiler can find it when it encounters an #include statement, i.e. in one of the directories listed under INCLUDE in the project or compiler settings, e.g. under Tools / Options / Projects and Settings / VC++ Directories / Include files (see here)

Community
  • 1
  • 1
QSQ
  • 446
  • 2
  • 5
  • nah i downloaded the binary version so it doesnt have any headers and VC++ directories is deprecated in VS 2012 so I dont know how to change them – user1895629 Jun 11 '13 at 20:32
  • 1
    Without the headers, the lib is almost useless. And if you have them, there are sure non-deprectated ways to add include paths to the project. – QSQ Jun 11 '13 at 20:33
  • 1
    @user1895629: If you know you don't have the header, why did you bother to `#include` the header? "Compiler, include this file when you compile that I know I don't have and you won't be able to find." makes no sense. You need the header to give the compiler the types and function prototypes that are contained in the library. – Ken White Jun 11 '13 at 20:41
  • @user: re the vc settings: quote from inet "If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++ Directories”, these settings will be persisted to the project file." (see http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/a494abb8-3561-4ebe-9eb0-6f644a679862) – QSQ Jun 11 '13 at 20:47
  • I'm sorry I really don't know how to link libraries, I'm not really used to windows8 yet aperently either the header didnt come up in my search but I found it, so if I include it in the spot in my image will it find the .lib itself when I compile? Or do I need to direct it too that as well? – user1895629 Jun 11 '13 at 22:12
  • ok I set it to include the headers, how do I make sure it compiles as a standalone .exe that doesnt need a .dll to run? or is it – user1895629 Jun 11 '13 at 22:22