Jump to content
  • Advertisement
Sign in to follow this  
sandblasted

help with the warnings

This topic is 3018 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

hi guys, I have just started learning openGL coding a few days earlier. I have compiled the first code (ex 1-2) in the RED book. It displays a rectangle perfectly. But 7 warnings are shown in my codeblocks IDE. I am including the code and the warnings. Can someone please explain me what do the warnings mean. I am totally new. So plz a little help guys.... code : #include <windows.h> #include <gl/glut.h> void display (void) { //glClearColor(0.0,0.0,0.0,0.0); glClear(GL_COLOR_BUFFER_BIT); glColor3f(.8, .555, .665); //glOrtho(0.0,1.0,0.0,1.0,-1.0,1.0); glBegin(GL_POLYGON); glVertex3f(0.5,0.5,0.0); glVertex3f(0.5,0.5,0.0); glVertex3f(0.25,0.75,0.0); glVertex3f(0.75,0.75,0.0); glEnd(); glFlush(); } void init (void){ glClearColor(.2,.6,.7,.1); glMatrixMode (GL_PROJECTION); glLoadIdentity (); glOrtho(0.0,1.0,0.0,1.0,-1.0,1.0); } int main(int argc, char** argv) { glutInit (&argc, argv); glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB); glutInitWindowSize (500, 500); glutInitWindowPosition (100, 100); glutCreateWindow ("a stupid fucking window"); init (); glutDisplayFunc (display); glutMainLoop (); return 0; } warnings: C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|58|warning: ignoring #pragma comment | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|66|warning: ignoring #pragma comment | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|67|warning: ignoring #pragma comment | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|68|warning: ignoring #pragma comment | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|76|warning: ignoring #pragma warning | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|77|warning: ignoring #pragma warning | C:\Program Files\CodeBlocks\MinGW\include\gl\glut.h|549|warning: 'int glutCreateMenu_ATEXIT_HACK(void (*)(int))' defined but not used|

Share this post


Link to post
Share on other sites
Advertisement
Looks like those warnings are generated by the glut.h file (but I could be wrong)

The format of the warning is quite simple...

<file name> <line number> "warning message"

Have a look at say line 58 of glut.h and see if there is a #pragma there...

(as mentioned #pragmas are a windows pre-processor directive IIRC)

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!