Hello.
I've no experience of OpenGL at all and have just begun today to try it out. A tutorial required me to install the GLFW, GLM and GLEW libraries to avoid manually writing boring long codes. And I've downloaded the latest versions.

I followed the instructions of the GLM (copying the header files) and GLEW (copying the .dll, .lib and header files).

I don't really understand the instructions for installation in the readme file and just simply copied the glfw.h to my computer's GL libraries. As a result, when I ran a piece of simple code, it gave me a bunch of "unresolved external symbol" errors.

I'm using Visual Studio Express 2012 and its built-in compiler.

Can anyone tell me how to correctly install?

The code I used is:

#include "stdafx.h"

// Include standard headers
#include <stdio.h>
#include <stdlib.h>

// Include GLEW
#include <GL/glew.h>

// Include GLFW
#include <GL/glfw.h>

// Include GLM
#include <glm/glm.hpp>
using namespace glm;

int main() {
// Initialize GLFW
if( !glfwInit() ) {
fprintf( stderr, "Failed to initialize GLFW\n" );
return -1;
}

glfwOpenWindowHint(GLFW_FSAA_SAMPLES, 4);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MAJOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_VERSION_MINOR, 3);
glfwOpenWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

// Open a window and create its OpenGL context
if( !glfwOpenWindow( 1024, 768, 0,0,0,0, 32,0, GLFW_WINDOW ) ) {
fprintf( stderr, "Failed to open GLFW window\n" );
glfwTerminate();
return -1;
}

// Initialize GLEW
if (glewInit() != GLEW_OK) {
fprintf(stderr, "Failed to initialize GLEW\n");
return -1;
}

glfwSetWindowTitle( "Window" );
}


And the errors are:

Warning 1 warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss c:\program files (x86)\windows kits\8.0\include\um\glm\core\func_common.hpp 1 1 Another OpenGL Application
Warning 2 warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss c:\program files (x86)\windows kits\8.0\include\um\glm\core\func_common.inl 1 1 Another OpenGL Application
Warning 3 warning C4819: The file contains a character that cannot be represented in the current code page (932). Save the file in Unicode format to prevent data loss c:\program files (x86)\windows kits\8.0\include\um\glm\core\func_integer.hpp 1 1 Another OpenGL Application
Error 4 error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 5 error LNK2019: unresolved external symbol _glfwInit referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 6 error LNK2019: unresolved external symbol _glfwTerminate referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 7 error LNK2019: unresolved external symbol _glfwOpenWindow referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 8 error LNK2019: unresolved external symbol _glfwOpenWindowHint referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 9 error LNK2019: unresolved external symbol _glfwSetWindowTitle referenced in function _main C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Another OpenGL Application\Another OpenGL Application.obj Another OpenGL Application
Error 10 error LNK1120: 6 unresolved externals C:\Users\greekfellows\Documents\Visual Studio 2012\Projects\Sample OpenGL Application\Another OpenGL Application\Debug\Another OpenGL Application.exe Another OpenGL Application