zoukankan      html  css  js  c++  java
  • OpenGL, Net 2005, error C2381: 'exit' : redefinition; __declspec(noreturn) differs

    OpenGL+VC.NET 2005

    包含文件:
    #include <GL/glut.h>
    #include <stdlib.h>
    #include <stdio.h>

    编译出错:
    Error 1 error C2381: 'exit' : redefinition; __declspec(noreturn) differs d:\program files\microsoft visual studio 8\vc\include\stdlib.h 406

    解决方法:
    1. 找到“glut.h”文件,如“D:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\Include\gl”下;
    2. 打开“glut.h”到146行,找找看,应该发现一行代码为“extern _CRTIMP void __cdecl exit(int);”,这就是罪魁祸首。
    3. 把它删掉,不太放心?那就先注释掉好了。把这一行代码用“_CRTIMP __declspec(noreturn) void __cdecl exit(int);”代替。
    4. 重新编译,可以了!

  • 相关阅读:
    gin内置验证器使用
    model
    work,工作模式
    orm框架
    simple模式下rabbitmq的代码
    rabbitmq介绍
    订阅模式
    路由模式
    redis五大数据类型
    Go操作redis
  • 原文地址:https://www.cnblogs.com/itachi7/p/2642625.html
Copyright © 2011-2022 走看看