opengl - glfw + glew : unresolved external symbol with older functions -


i have issues glfw3 , glew.

here code :

#pragma comment(lib, "glew32.lib") #pragma comment(lib, "glfw3dll.lib")  #include <iostream>  #include "glew\glew.h" #include "glfw\glfw3.h"  void error_callback(int error, const char* description) {     std::cerr << description << std::endl; }  void input_callback(glfwwindow* wnd, int key, int scancode, int action, int mods) {     if(key == glfw_key_escape && action == glfw_press) glfwsetwindowshouldclose(wnd,      gl_true); }  int main(int argc, char** argv) { //init glfw if(!glfwinit()) return exit_failure;  //error callback glfwseterrorcallback(error_callback);  //create window opengl 4.3 core profil context glfwwindowhint(glfw_context_version_major, 4); glfwwindowhint(glfw_context_version_minor, 3); glfwwindowhint(glfw_opengl_forward_compat, gl_false); glfwwindowhint(glfw_opengl_profile, glfw_opengl_core_profile);  glfwwindow* window = glfwcreatewindow(1024, 768, "glfw opengl", null, null); if(!window) {     glfwterminate();     return exit_failure; }  //input callback glfwsetkeycallback(window, input_callback);  //binding context glfwmakecontextcurrent(window);  //init glew glewexperimental = gl_true; if(glew_ok != glewinit()) {     glfwdestroywindow(window);     glfwterminate();     return exit_failure; }  //generate vertex buffer object gluint vbo; glgenbuffers(1, &vbo);  //set clear color glclearcolor(100.f/255, 149.f/255, 237.f/255, 1.0);  //main loop while(!glfwwindowshouldclose(window)) {     glclear(gl_color_buffer_bit | gl_depth_buffer_bit);      glfwswapbuffers(window);     glfwpollevents(); }  //destroy window glfwdestroywindow(window);  //terminate glfw glfwterminate();  return exit_success; } 

and here errors :

error lnk2019: symbole externe non rÚsolu __imp__glclear@4 rÚfÚrencÚ dans la fonction _main c:\users\adrien\documents\cpp\glfwsetup\glfwsetup\main.obj  glfwsetup  error lnk2019: symbole externe non rÚsolu __imp__glclearcolor@16 rÚfÚrencÚ dans la fonction _main   c:\users\adrien\documents\cpp\glfwsetup\glfwsetup\main.obj  glfwsetup 

if comment glclearcolor , glclear lines program runs (even glgenbuffers part). don't understand why can use opengl functions can't use others.

os : windows 7 64 bits. ide : visual studio 2012 express. glfw version : 3. glew version 1.10.0.

problem solved.

i forgot link opengl library.

thank help.


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -