problems with openGl on eclipse

Posted by lego69 on Stack Overflow See other posts from Stack Overflow or by lego69
Published on 2010-05-18T13:43:29Z Indexed on 2010/05/18 13:50 UTC
Read the original article Hit count: 350

Filed under:
|
|
|
|

I'm working on Windows XP I have portable version of Eclipse Galileo, but I didn't find there glut so I decided to add it using this link I made all steps and and now I'm trying to compile this code

#include "GL/glut.h"
#include "GL/gl.h"
#include "GL/glu.h"

///////////////////////////////////////////////////////////
// Called to draw scene
void RenderScene(void)
 {
 // Clear the window with current clearing color
 glClear(GL_COLOR_BUFFER_BIT);


 // Flush drawing commands
    glFlush();
 }

///////////////////////////////////////////////////////////
// Setup the rendering state
void SetupRC(void)
    {
    glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
    }

///////////////////////////////////////////////////////////
// Main program entry point
void main(int argc, char* argv[])
 {
 glutInit(&argc, argv);
 glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
        glutInitWindowSize(800,600);
 glutCreateWindow("Simple");
 glutDisplayFunc(RenderScene);

 SetupRC();

 glutMainLoop();
    }

and I have this errors

Simple.o: In function `RenderScene':
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:16: undefined reference to `_imp__glClear'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:20: undefined reference to `_imp__glFlush'
Simple.o: In function `SetupRC':
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:27: undefined reference to `_imp__glClearColor'
Simple.o: In function `main':
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:34: undefined reference to `glutInit'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:35: undefined reference to `glutInitDisplayMode'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:36: undefined reference to `glutInitWindowSize'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:37: undefined reference to `glutCreateWindow'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:38: undefined reference to `glutDisplayFunc'
C:/Documents and Settings/Administrator/Desktop/workspace/open/Debug/../Simple.c:42: undefined reference to `glutMainLoop'
collect2: ld returned 1 exit status

please can somebody help me, thanks in advance

© Stack Overflow or respective owner

Related posts about opengl

Related posts about glut