zoukankan      html  css  js  c++  java
  • opengl编译错误解决

    如果使用OpenGL的时候出现一下啊错误

     

    1>TEE.obj : error LNK2019: 无法解析的外部符号 __imp____glutInitWithExit@12,该符号在函数 _glutInit_ATEXIT_HACK@8 中被引用

    1>TEE.obj : error LNK2019: 无法解析的外部符号 __imp____glutCreateWindowWithExit@8,该符号在函数 _glutCreateWindow_ATEXIT_HACK@4 中被引用

    或者

    1>Simulator.obj : error LNK2001: 无法解析的外部符号 __imp____glutCreateWindowWithExit@8

    1>Simulator.obj : error LNK2001: 无法解析的外部符号 __imp____glutInitWithExit@12

    则恰好在#include<gl/glut.h>之前加上

    define GLUT_DISABLE_ATEXIT_HACK

     

    注:一定要恰好在#include glut.h之前加入以上代码,正确用法如下:

     

    #define GLUT_DISABLE_ATEXIT_HACK

    #include<gl/glut.h>

  • 相关阅读:
    大数据
    优化
    gnu
    sed
    hadoop部署
    安装 zookeeper
    ansible
    ssh 配置无密码登录
    未完待续
    解正向代理、反向代理、透明代理
  • 原文地址:https://www.cnblogs.com/haichun/p/3504036.html
Copyright © 2011-2022 走看看