Some usual error when configre glut, glui in windows (http://accad.osu.edu /~ Ywei/Help/HowTos.html)

Source: Internet
Author: User

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: glu32.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 wocould appear:
    • Error c2381: 'eg': 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 glu_building_lib/* extern _ cribd void _ cdecl exit (INT); */_ cribd _ 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.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.