zoukankan      html  css  js  c++  java
  • some usual error when configre glut, glui in windows(http://accad.osu.edu/~ywei/Help/HowTos.html)

    1. How to set up OpenGL in MS.Net on Accad Machine?

    • Right click on the solution in the solution Explorer window, open Property Pages.
    • In C/C++->Additional Include Directories, write "Z:\include".
    • In Linker->General->Additional Library Directoried, type "Z:/lib".
    • In Linker->Input->Additional Dependencies and add the OpenGL libs: glut32.lib glu32.lib opengl32.lib (Microsoft OpenGL)..

    A samle code showing all the OpenGL primitives in a row. source code: prim.c

    2. How to set up Glui in MS.Net on Accad Machine?

    • Download the current version of glui from here and
    • Compile the example program to get the glui32.lib. Notice the following error message would appear:
      • error C2381: 'exit' : redefinition; __declspec(noreturn) differs Z:/include\GL\glut.h(146) : see declaration of 'exit.
    • To solve this, make the following changes to glut.h around line 145. :
      • #if defined(_WIN32) # ifndef GLUT_BUILDING_LIB /*extern _CRTIMP void __cdecl exit(int);*/ _CRTIMP __declspec(noreturn) void __cdecl exit(int); # endif
    • Create a "Win32 Console Application" and Set up for 1 first
    • Update the glui.h file in Z:/include and the glui32.lib in Z:/lib.
    • If getting an error like this , try in C/C++->Code Generation->Runtime Library, use MDd instead of MLd (this is because in the example project the default setting to compile the glui32.lib is MDd; so if you change it to MLd there you don't need to change setting for your own project)
    • Include the file "glui.h" in any file that uses the GLUI library.
  • 相关阅读:
    listView控件演示程序
    猪悟能淘宝商品下载专家v3版开发手记
    c# WebClient类
    分隔控件splitter演示程序
    C#中SESSIONID的获取
    工具栏toolBar演示程序
    Cookie总结
    C#获取网页源码并且自动判断网页字符集编码
    如何在Google Code上建立私有代码版本库
    iOS应用程序生命周期(前后台切换,应用的各种状态)详解
  • 原文地址:https://www.cnblogs.com/cloudseawang/p/942340.html
Copyright © 2011-2022 走看看