QT  += opengl

这是因为直接调用了OpenGL的函数,需要在pro中增加以下库引用:
win32-g++ {
    LIBS += -lopengl32 -lglu32 -glmf32
}
win32-msvc*{
    LIBS += opengl32.lib glu32.lib glmf32.lib
}


qt建议使用:
QOpenGLFunctions.

出现error: undefined reference to `gluLookAt@72' 这个是缺 -lglu32

相关文章:

  • 2021-09-28
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案