c++ - 未解析的外部符号 glewExperimental

标签 c++ opengl glew

我正在尝试使用 glew 创建一个窗口,但出现此链接错误。我也尝试自己编译库,但也没有用。我还确保 glew 正确链接。

这是导致错误的代码:

 if (configuration.api == API::OpenGL) {
      static bool sGLEWInitialized;
      if (!sGLEWInitialized) {
           glfwMakeContextCurrent(handle);
            #if WINDOWS
            glewExperimental = true;
            auto error = glewInit();

            if (error) {
                destroy_glfw_window(handle);
                throw std::runtime_error("Failed to initialize GLEW");
           }
           #endif

           sGLEWInitialized = true;
      }
 }

最佳答案

采用
glew32s.lib
glew32.lib

glew-2.1.0-win32\glew-2.1.0\lib\Release\x64
不是
glew-2.1.0\lib\Release\Win32

关于c++ - 未解析的外部符号 glewExperimental,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49391509/

相关文章:

c++ - Visual C++ 2005 探查器

c - eclipse 上 openGl 的问题

c++ - GLFW/GLEW C++ (atioglxx.dll)

c++ - 不同类型的Typedef重定义(Emscripten SDL2+OpenGL)

c++ - Meyers 提出的 MCU 寄存器抽象的新布局

c++ - 从 std::vector<Tensor> 值创建张量

c++ - 为什么 C++ strtok() 不适合我?

c++ - 为什么我在这段代码中得到一个 undefined reference ?

opengl - 如何将库添加到 CMakeLists?

c++ - 在 GLFW 中处理小型引擎的输入