Small problem solution encountered in the project

Source: Internet
Author: User

VS2010 in the process of using glut.lib always link does not pass

The following error occurred:

1>xiaoche.obj:error LNK2019: unresolved external symbol [email protected], which is referenced in the function [email protected]
1>xiaoche.obj:error LNK2019: unresolved external symbol [email protected], which is referenced in the function [email protected]
1>e:\ Project \opengl\xiaoche\debug\xiaoche.exe:fatal Error lnk1120:2 an unresolved external command

There are two solutions:

1, before the #include<gl/glut.h> add

1 #define Glut_disable_atexit_hack

However, every time you encounter a project that uses glut.lib, you have to add it, more trouble!

2. Item---Properties-->--> Configuration Properties-->c/c++--> Preprocessor--preprocessor defines the header plus glut_building_lib; , and then OK.

The following methods are available when you add a Lib file:

1, Mode 1, the program head to add the following statement

1 #pragma

2, Mode 2

Item--Properties-->--> Configuration Properties--linker----add glut.lib on the head, and then OK.

Small problem solution encountered in the project

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.