Jump to content
  • Advertisement
Sign in to follow this  
awesty

OpenGL GLUT Problems

This topic is 3870 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have just started reading 'Beginning OpenGL Game Programming' and I tried to build the first example but got this error: fatal error C1083: Cannot open include file: 'glut.h': No such file or directory c:\cpp\opengl\simple\simple.cpp 2 So I tried building GLUT 3.7.6 but I got this error: Error 16 error PRJ0019: A tool returned an error code from "Copying libraries, headers & dll's..." glut32 And these warnings: Warning 1 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_dstr.c 1216 Warning 2 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_dstr.c 1219 Warning 3 warning C4996: 'strcpy' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_dstr.c 1230 Warning 4 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_dstr.c 1241 Warning 5 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_dstr.c 1249 Warning 6 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_gamemode.c 514 Warning 7 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_gamemode.c 517 Warning 8 warning C4996: 'strcpy' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_gamemode.c 528 Warning 9 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_gamemode.c 531 Warning 10 warning C4996: 'strtok' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_gamemode.c 539 Warning 11 warning C4996: 'getenv' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_mesa.c 34 Warning 12 warning C4996: 'strcpy' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut_util.c 27 Warning 13 warning C4996: 'strdup' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\win32_menu.c 410 Warning 14 warning C4996: 'strdup' was declared deprecated c:\documents and settings\awesomo\local settings\temp\glut-3.7.6-src\glut-3.7.6\lib\glut\win32_menu.c 449 Warning 15 warning LNK4017: DESCRIPTION statement not supported for the target platform; ignored c:\Documents and Settings\Awesomo\Local Settings\Temp\glut-3.7.6-src\glut-3.7.6\lib\glut\glut.def 1 What am I doing wrong?

Share this post


Link to post
Share on other sites
Advertisement
Instead of building GLUT, you should just take the already built binaries and just link the sample application to them.

The warning that you are getting are coming from either the 2005 or 2008 version of MS Visual Studio. The warnings indicate that the functions that have been specified will at some point no longer be apart of the API. You should be ok to ignore those warnings, since I doubt that MS will be removing them from the standard C library. I am sure others can comment on this better than I have. Hope this helps.

Share this post


Link to post
Share on other sites
The error, C1083 mean the compiler cannot find "glut.h". Please check the location of "glut.h".

Others are just warnings. I agree with "Deception666". Those standard string functions cannot be deprecated. It is one of annoying warnings generated by MS VC++.

You can ignore them, or, disable the warnings by putting the following at the beginning of the file;
#pragma warning(disable: 4996)

Or add the following option in VC compiler command line property page;
/D "_CRT_SECURE_NO_DEPRECATE"

Share this post


Link to post
Share on other sites
When using VS* check that you specified:
Additional Include Directories
Additional Library Directories
and
Additional Dependencies

when you are using the dynamic link libraries than copy the dlls into the debug and release folder of your project or into windows/system32/(dllhell)

Share this post


Link to post
Share on other sites
It depends on where your have your Windows SDK files installed, I have mine installed to G:\Microsoft Platform SDK, so my glut.h is in G:\Microsoft Platform SDK\Include\gl. Is it possible you don't even have the Windows SDK installed? I know that the free version of VS2005 requires you to install it manually.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!