Sign in to follow this  
sandblasted

help with the warnings

Recommended Posts

sandblasted    100
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
GregMichael    135
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this